.dependency-graph {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin: 2rem 0;
  overflow: hidden;
}

.graph-header {
  background: #f4f5f7;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid #dfe1e6;
}

.graph-header h2 {
  color: #172b4d;
  font-size: 1.5rem;
  margin: 0 0 1rem 0;
  font-weight: 600;
}

.graph-controls {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.control-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.control-group label {
  color: #5e6c84;
  font-size: 0.875rem;
  font-weight: 500;
}

.control-group select {
  padding: 0.5rem;
  border: 1px solid #dfe1e6;
  border-radius: 4px;
  font-size: 0.875rem;
  background: white;
  color: #172b4d;
}

.control-group button {
  background: #f4f5f7;
  color: #5e6c84;
  border: 1px solid #dfe1e6;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.control-group button:hover {
  background: #e4e6ea;
  color: #172b4d;
}

.control-group input[type="checkbox"] {
  margin: 0;
}

/* Graph Content */
.graph-content {
  display: grid;
  grid-template-columns: 1fr 250px;
  gap: 0;
  background: #fafbfc;
}

.graph-container {
  padding: 2rem;
  background: white;
  border-right: 1px solid #dfe1e6;
  overflow: hidden;
}

.dependency-svg {
  border: 1px solid #dfe1e6;
  border-radius: 8px;
  background: #fafbfc;
}

/* SVG Styles */
.graph-link {
  transition: stroke-width 0.2s ease;
}

.graph-link:hover {
  stroke-width: 4 !important;
}

.node-group {
  transition: transform 0.2s ease;
}

.node-group:hover {
  transform: translate(var(--translate-x, 0), var(--translate-y, 0)) scale(1.1);
}

.node-group circle {
  transition: all 0.2s ease;
}

.node-group:hover circle {
  stroke-width: 3;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.node-group text {
  pointer-events: none;
  user-select: none;
}

/* Graph Legend */
.graph-legend {
  background: #f4f5f7;
  padding: 1.5rem;
  border-left: 1px solid #dfe1e6;
  height: fit-content;
  max-height: 600px;
  overflow-y: auto;
}

.graph-legend h4 {
  color: #172b4d;
  font-size: 1rem;
  margin: 0 0 1rem 0;
  font-weight: 600;
}

.legend-section {
  margin-bottom: 1.5rem;
}

.legend-section h5 {
  color: #5e6c84;
  font-size: 0.875rem;
  font-weight: 600;
  margin: 0 0 0.75rem 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.legend-items {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: #172b4d;
}

.legend-color {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid white;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.legend-line {
  width: 20px;
  height: 3px;
  border-radius: 2px;
}

.legend-priority {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.legend-priority.critical {
  background: #de350b;
}

.legend-priority.high {
  background: #ff8b00;
}

.legend-priority.medium {
  background: #ffab00;
}

.legend-priority.low {
  background: #00875a;
}

/* Selection Info */
.selection-info {
  background: #f4f8ff;
  border: 1px solid #b3d4ff;
  border-radius: 8px;
  padding: 1.5rem;
  margin: 1.5rem 2rem;
}

.node-details h4,
.link-details h4 {
  color: #0052cc;
  font-size: 1rem;
  margin: 0 0 1rem 0;
  font-weight: 600;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(176, 212, 255, 0.3);
  font-size: 0.875rem;
}

.detail-row:last-child {
  border-bottom: none;
}

.detail-row span:first-child {
  color: #5e6c84;
  font-weight: 500;
}

.detail-row span:last-child {
  color: #172b4d;
  font-weight: 600;
  text-transform: capitalize;
}

/* Graph Zoom and Pan Controls */
.graph-zoom-controls {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: white;
  border: 1px solid #dfe1e6;
  border-radius: 6px;
  padding: 0.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.zoom-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: #f4f5f7;
  color: #5e6c84;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  transition: all 0.2s ease;
}

.zoom-btn:hover {
  background: #e4e6ea;
  color: #172b4d;
}

/* Graph Statistics */
.graph-stats {
  background: white;
  border: 1px solid #dfe1e6;
  border-radius: 6px;
  padding: 1rem;
  margin: 1rem 2rem;
}

.graph-stats h4 {
  color: #172b4d;
  font-size: 0.95rem;
  margin: 0 0 0.75rem 0;
  font-weight: 600;
}

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

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 1.5rem;
  font-weight: 700;
  color: #0052cc;
  display: block;
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.75rem;
  color: #5e6c84;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Graph Loading */
.graph-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 400px;
  color: #5e6c84;
  font-size: 1rem;
}

.loading-spinner {
  border: 3px solid #f4f5f7;
  border-top: 3px solid #0052cc;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin-right: 1rem;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Graph Empty State */
.graph-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 400px;
  color: #5e6c84;
  text-align: center;
  padding: 2rem;
}

.empty-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.graph-empty h3 {
  color: #172b4d;
  font-size: 1.25rem;
  margin: 0 0 0.5rem 0;
  font-weight: 600;
}

.graph-empty p {
  font-size: 0.875rem;
  margin: 0;
  line-height: 1.4;
}

/* Tooltip */
.graph-tooltip {
  position: absolute;
  background: #172b4d;
  color: white;
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  font-size: 0.8rem;
  pointer-events: none;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.graph-tooltip.visible {
  opacity: 1;
}

.graph-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: #172b4d transparent transparent transparent;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .graph-content {
    grid-template-columns: 1fr;
  }
  
  .graph-legend {
    border-left: none;
    border-top: 1px solid #dfe1e6;
    max-height: none;
  }
  
  .graph-container {
    border-right: none;
  }
}

@media (max-width: 768px) {
  .graph-header {
    padding: 1rem;
  }
  
  .graph-controls {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }
  
  .control-group {
    justify-content: space-between;
  }
  
  .graph-container {
    padding: 1rem;
  }
  
  .dependency-svg {
    width: 100%;
    height: auto;
  }
  
  .selection-info {
    margin: 1rem;
  }
  
  .legend-items {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .graph-header h2 {
    font-size: 1.25rem;
  }
  
  .control-group {
    flex-direction: column;
    align-items: stretch;
  }
  
  .control-group label {
    margin-bottom: 0.25rem;
  }
  
  .legend-items {
    grid-template-columns: 1fr;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
}
.batch-processing {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 2rem;
  margin: 2rem 0;
}

.batch-header {
  text-align: center;
  margin-bottom: 2rem;
}

.batch-header h2 {
  color: #172b4d;
  margin-bottom: 0.5rem;
  font-size: 1.8rem;
}

.batch-header p {
  color: #6b778c;
  font-size: 1rem;
  margin: 0 0 1rem 0;
}

.upload-mode-selector {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 1rem;
}

.mode-btn {
  padding: 0.75rem 1.5rem;
  border: 2px solid #dfe1e6;
  border-radius: 8px;
  background: white;
  color: #5e6c84;
  font-weight: 500;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.mode-btn:hover {
  border-color: #0052cc;
  color: #0052cc;
  background: #f4f8ff;
}

.mode-btn.active {
  border-color: #0052cc;
  background: #0052cc;
  color: white;
  box-shadow: 0 2px 8px rgba(0, 82, 204, 0.3);
}

.excel-upload-section {
  margin-top: 1rem;
}

.more-requirements {
  text-align: center;
  color: #5e6c84;
  font-style: italic;
  padding: 1rem;
  background: #f4f5f7;
  border-radius: 6px;
  margin-top: 0.75rem;
}

/* Upload Area */
.batch-upload-area {
  border: 2px dashed #dfe1e6;
  border-radius: 8px;
  padding: 3rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: #fafbfc;
  margin-bottom: 2rem;
}

.batch-upload-area:hover {
  border-color: #0052cc;
  background: #f4f8ff;
}

.batch-upload-area.drag-over {
  border-color: #0052cc;
  background: #e8f4ff;
  transform: scale(1.02);
}

.upload-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.batch-upload-area h3 {
  color: #172b4d;
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
}

.batch-upload-area p {
  color: #6b778c;
  margin-bottom: 0.25rem;
}

.upload-limit {
  font-size: 0.875rem !important;
  color: #5e6c84 !important;
}

/* Processing Options */
.batch-options {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  border: 1px solid #e1e5e9;
}

.batch-options h3 {
  color: #172b4d;
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.option-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.option-item label {
  font-weight: 500;
  color: #172b4d;
  min-width: 120px;
}

.option-item select {
  flex: 1;
  padding: 0.5rem;
  border: 1px solid #dfe1e6;
  border-radius: 4px;
  background: white;
}

.checkbox-item {
  grid-column: span 2;
}

.checkbox-item label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  min-width: auto;
}

.checkbox-item input[type="checkbox"] {
  margin: 0;
}

/* Files Section */
.batch-files {
  margin-bottom: 2rem;
}

.files-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #e1e5e9;
}

.files-header h3 {
  color: #172b4d;
  margin: 0;
}

.files-actions {
  display: flex;
  gap: 0.5rem;
}

.btn-primary, .btn-secondary, .btn-danger, .btn-remove {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 4px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.btn-primary {
  background: #0052cc;
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background: #0065ff;
}

.btn-primary:disabled {
  background: #dfe1e6;
  color: #6b778c;
  cursor: not-allowed;
}

.btn-secondary {
  background: #f4f5f7;
  color: #172b4d;
  border: 1px solid #dfe1e6;
}

.btn-secondary:hover {
  background: #e4e5e7;
}

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

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

.btn-remove {
  background: transparent;
  color: #de350b;
  padding: 0.25rem;
  border: 1px solid transparent;
}

.btn-remove:hover {
  background: #ffebe6;
  border-color: #de350b;
}

/* Progress Bars */
.overall-progress {
  background: #f8f9fa;
  border-radius: 6px;
  padding: 1rem;
  margin-bottom: 1rem;
  border: 1px solid #e1e5e9;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  color: #6b778c;
  font-weight: 500;
}

.progress-bar {
  background: #e1e5e9;
  border-radius: 10px;
  height: 8px;
  overflow: hidden;
  position: relative;
}

.progress-bar.small {
  height: 4px;
  width: 80px;
}

.progress-fill {
  background: linear-gradient(90deg, #0052cc, #0065ff);
  height: 100%;
  border-radius: 10px;
  transition: width 0.3s ease;
  position: relative;
}

.progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 20px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3));
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-20px); }
  100% { transform: translateX(20px); }
}

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

.file-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: #fafbfc;
  border: 1px solid #e1e5e9;
  border-radius: 6px;
  transition: all 0.2s;
}

.file-item:hover {
  border-color: #dfe1e6;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.file-info {
  flex: 1;
}

.file-name {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.status-icon {
  font-size: 1.1rem;
}

.name {
  font-weight: 500;
  color: #172b4d;
}

.size {
  color: #6b778c;
  font-size: 0.875rem;
}

.file-error {
  color: #de350b;
  font-size: 0.875rem;
  background: #ffebe6;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  margin-top: 0.25rem;
}

.file-results {
  color: #00875a;
  font-size: 0.875rem;
  background: #e3fcef;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  margin-top: 0.25rem;
}

.processing-time, .ai-provider {
  color: #6b778c;
  font-weight: normal;
}

.file-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.file-progress {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.progress-text {
  font-size: 0.75rem;
  color: #6b778c;
  min-width: 30px;
  text-align: right;
}

/* Results Section */
.batch-results {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 2rem;
  border: 1px solid #e1e5e9;
}

.batch-results h3 {
  color: #172b4d;
  margin-bottom: 1.5rem;
  font-size: 1.3rem;
}

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

.stat-card {
  background: white;
  padding: 1.5rem;
  border-radius: 6px;
  text-align: center;
  border: 1px solid #e1e5e9;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.stat-number {
  font-size: 2rem;
  font-weight: 600;
  color: #0052cc;
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.875rem;
  color: #6b778c;
  font-weight: 500;
}

.results-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.issue-breakdown, .quality-score, .recommendations {
  background: white;
  padding: 1.5rem;
  border-radius: 6px;
  border: 1px solid #e1e5e9;
}

.results-details h4 {
  color: #172b4d;
  margin-bottom: 1rem;
  font-size: 1rem;
}

.breakdown-items {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.breakdown-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid #f4f5f7;
}

.breakdown-item:last-child {
  border-bottom: none;
}

.type {
  font-weight: 500;
  color: #172b4d;
}

.count {
  background: #0052cc;
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  min-width: 24px;
  text-align: center;
}

.score-display {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.score-number {
  font-size: 2rem;
  font-weight: 600;
  color: #172b4d;
  min-width: 60px;
}

.score-bar {
  flex: 1;
  background: #e1e5e9;
  border-radius: 10px;
  height: 12px;
  overflow: hidden;
}

.score-fill {
  height: 100%;
  border-radius: 10px;
  transition: width 0.5s ease;
}

.recommendations ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.recommendations li {
  padding: 0.75rem;
  background: #fff3cd;
  border: 1px solid #ffeaa7;
  border-radius: 4px;
  margin-bottom: 0.5rem;
  color: #856404;
  line-height: 1.4;
}

.recommendations li:last-child {
  margin-bottom: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
  .batch-processing {
    padding: 1rem;
    margin: 1rem 0;
  }

  .batch-upload-area {
    padding: 2rem 1rem;
  }

  .files-header {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }

  .files-actions {
    justify-content: center;
  }

  .file-item {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }

  .file-actions {
    justify-content: flex-end;
  }

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

  .checkbox-item {
    grid-column: span 1;
  }

  .results-overview {
    grid-template-columns: repeat(2, 1fr);
  }

  .results-details {
    grid-template-columns: 1fr;
  }

  .score-display {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }
}

/* Animation for processing states */
.file-item[data-status="processing"] {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(0, 82, 204, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(0, 82, 204, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 82, 204, 0); }
}
.excel-csv-parser {
  margin: 1rem 0;
}

.parser-dropzone {
  border: 2px dashed #dfe1e6;
  border-radius: 8px;
  padding: 2rem;
  text-align: center;
  background: #fafbfc;
  transition: all 0.2s ease;
  position: relative;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.parser-dropzone:hover {
  border-color: #0052cc;
  background: #f4f8ff;
}

.parser-dropzone.drag-over {
  border-color: #0052cc;
  background: #e6f3ff;
  transform: scale(1.02);
}

.parser-dropzone.processing {
  border-color: #ffc400;
  background: #fffae6;
}

.parser-dropzone.processing::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.parser-content {
  max-width: 500px;
  margin: 0 auto;
}

.parser-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.7;
}

.parser-dropzone h3 {
  color: #172b4d;
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.parser-dropzone p {
  color: #5e6c84;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
}

.expected-columns {
  background: white;
  border: 1px solid #dfe1e6;
  border-radius: 6px;
  padding: 1rem;
  margin: 1rem 0;
  text-align: left;
}

.expected-columns h4 {
  color: #172b4d;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.expected-columns ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.expected-columns li {
  padding: 0.25rem 0;
  font-size: 0.8rem;
  color: #5e6c84;
  display: flex;
  align-items: center;
}

.expected-columns li::before {
  content: '•';
  color: #0052cc;
  margin-right: 0.5rem;
  font-weight: bold;
}

.expected-columns strong {
  color: #172b4d;
  font-weight: 600;
}

.file-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.upload-button {
  display: inline-block;
  background: #0052cc;
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  font-weight: 500;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  text-decoration: none;
}

.upload-button:hover {
  background: #0747a6;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 82, 204, 0.3);
}

.upload-button:active {
  transform: translateY(0);
}

.parser-dropzone.processing .upload-button {
  background: #ffc400;
  color: #172b4d;
  cursor: not-allowed;
}

/* Requirements preview styles */
.requirements-preview {
  margin-top: 2rem;
  border: 1px solid #dfe1e6;
  border-radius: 8px;
  background: white;
}

.preview-header {
  background: #f4f5f7;
  padding: 1rem;
  border-bottom: 1px solid #dfe1e6;
  border-radius: 8px 8px 0 0;
}

.preview-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #172b4d;
  margin: 0 0 0.5rem 0;
}

.preview-stats {
  display: flex;
  gap: 1rem;
  font-size: 0.875rem;
  color: #5e6c84;
  flex-wrap: wrap;
}

.preview-stat {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.preview-stat.success {
  color: #006644;
}

.preview-stat.warning {
  color: #974f00;
}

.preview-stat.error {
  color: #de350b;
}

.preview-content {
  padding: 1rem;
  max-height: 400px;
  overflow-y: auto;
}

.requirement-preview-item {
  border: 1px solid #dfe1e6;
  border-radius: 6px;
  padding: 1rem;
  margin-bottom: 0.75rem;
  background: #fafbfc;
  transition: all 0.2s ease;
}

.requirement-preview-item:hover {
  border-color: #0052cc;
  background: white;
}

.requirement-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
  gap: 1rem;
}

.requirement-id {
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.75rem;
  background: #172b4d;
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-weight: 500;
  white-space: nowrap;
}

.requirement-priority {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-weight: 600;
  text-transform: uppercase;
  white-space: nowrap;
}

.requirement-priority.critical {
  background: #ffebe6;
  color: #de350b;
}

.requirement-priority.high {
  background: #fff4e6;
  color: #ff8b00;
}

.requirement-priority.medium {
  background: #fff7e6;
  color: #ffc400;
}

.requirement-priority.low {
  background: #e3fcef;
  color: #006644;
}

.requirement-title {
  font-weight: 600;
  color: #172b4d;
  margin-bottom: 0.25rem;
  font-size: 0.95rem;
  line-height: 1.3;
}

.requirement-description {
  color: #5e6c84;
  font-size: 0.875rem;
  line-height: 1.4;
  margin-bottom: 0.5rem;
}

.requirement-metadata {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: #6b778c;
}

.requirement-metadata span {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.preview-errors {
  background: #ffebe6;
  border: 1px solid #ffbdad;
  border-radius: 6px;
  padding: 1rem;
  margin-top: 1rem;
}

.preview-errors h4 {
  color: #de350b;
  font-size: 0.875rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
}

.preview-errors ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.preview-errors li {
  color: #bf2600;
  font-size: 0.8rem;
  padding: 0.25rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.preview-errors li::before {
  content: '⚠️';
  font-size: 0.75rem;
}

.preview-actions {
  padding: 1rem;
  border-top: 1px solid #dfe1e6;
  background: #f4f5f7;
  border-radius: 0 0 8px 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.preview-summary {
  font-size: 0.875rem;
  color: #5e6c84;
}

.preview-buttons {
  display: flex;
  gap: 0.5rem;
}

.btn-preview {
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.btn-preview.secondary {
  background: white;
  border-color: #dfe1e6;
  color: #5e6c84;
}

.btn-preview.secondary:hover {
  border-color: #b3d4ff;
  color: #0052cc;
}

.btn-preview.primary {
  background: #0052cc;
  border-color: #0052cc;
  color: white;
}

.btn-preview.primary:hover {
  background: #0747a6;
  border-color: #0747a6;
}

.btn-preview:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Responsive design */
@media (max-width: 768px) {
  .parser-dropzone {
    padding: 1.5rem 1rem;
    min-height: 250px;
  }
  
  .parser-content {
    max-width: none;
  }
  
  .preview-stats {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .requirement-preview-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .requirement-metadata {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .preview-actions {
    flex-direction: column;
    align-items: stretch;
  }
  
  .preview-buttons {
    justify-content: stretch;
  }
  
  .btn-preview {
    flex: 1;
    justify-content: center;
  }
}
.validation-results {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin: 2rem 0;
  overflow: hidden;
}

.validation-header {
  background: #f4f5f7;
  padding: 1.5rem 2rem 0;
  border-bottom: 1px solid #dfe1e6;
}

.validation-header h2 {
  color: #172b4d;
  font-size: 1.5rem;
  margin: 0 0 1rem 0;
  font-weight: 600;
}

.validation-tabs {
  display: flex;
  gap: 0;
  margin-bottom: -1px;
}

.tab-btn {
  padding: 0.75rem 1.5rem;
  border: 1px solid #dfe1e6;
  border-bottom: none;
  background: white;
  color: #5e6c84;
  font-weight: 500;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: 6px 6px 0 0;
  margin-right: 0.25rem;
}

.tab-btn:hover {
  background: #f4f8ff;
  color: #0052cc;
}

.tab-btn.active {
  background: white;
  color: #172b4d;
  border-color: #0052cc;
  border-bottom: 1px solid white;
  position: relative;
  z-index: 1;
}

/* Overview Tab Styles */
.validation-overview {
  padding: 2rem;
}

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

.stat-card {
  background: #fafbfc;
  border: 2px solid #dfe1e6;
  border-radius: 8px;
  padding: 1.5rem 1rem;
  text-align: center;
  transition: all 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.stat-card.success {
  border-color: #00875a;
  background: #e3fcef;
}

.stat-card.error {
  border-color: #de350b;
  background: #ffebe6;
}

.stat-card.warning {
  border-color: #ff8b00;
  background: #fff4e6;
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: #172b4d;
  margin-bottom: 0.25rem;
}

.stat-card.success .stat-number {
  color: #00875a;
}

.stat-card.error .stat-number {
  color: #de350b;
}

.stat-card.warning .stat-number {
  color: #ff8b00;
}

.stat-label {
  font-size: 0.875rem;
  color: #5e6c84;
  font-weight: 500;
}

.quality-distribution {
  margin-bottom: 2rem;
}

.quality-distribution h3 {
  color: #172b4d;
  font-size: 1.1rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.score-bars {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.score-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.score-label {
  min-width: 150px;
  font-size: 0.875rem;
  color: #5e6c84;
  font-weight: 500;
}

.score-track {
  flex: 1;
  height: 20px;
  background: #f4f5f7;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.score-fill {
  height: 100%;
  border-radius: 10px;
  transition: width 0.3s ease;
}

.score-count {
  min-width: 30px;
  text-align: right;
  font-weight: 600;
  color: #172b4d;
  font-size: 0.875rem;
}

.recommendations {
  background: #f4f8ff;
  border: 1px solid #b3d4ff;
  border-radius: 8px;
  padding: 1.5rem;
}

.recommendations h3 {
  color: #0052cc;
  font-size: 1rem;
  margin: 0 0 1rem 0;
  font-weight: 600;
}

.recommendations ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.recommendations li {
  padding: 0.5rem 0;
  color: #172b4d;
  font-size: 0.875rem;
  line-height: 1.4;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.recommendations li::before {
  content: '💡';
  font-size: 0.875rem;
  margin-top: 0.1rem;
}

/* Details Tab Styles */
.validation-details {
  padding: 2rem;
}

.requirements-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.requirement-validation {
  border: 1px solid #dfe1e6;
  border-radius: 8px;
  background: white;
  overflow: hidden;
  transition: all 0.2s ease;
}

.requirement-validation:hover {
  border-color: #b3d4ff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.requirement-validation.valid {
  border-left: 4px solid #00875a;
}

.requirement-validation.invalid {
  border-left: 4px solid #de350b;
}

.requirement-header {
  padding: 1rem 1.5rem;
  background: #fafbfc;
  border-bottom: 1px solid #dfe1e6;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.requirement-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
}

.requirement-id {
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.875rem;
  background: #172b4d;
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-weight: 500;
}

.validation-indicators {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.score-badge {
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

.severity-indicator {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-weight: 600;
}

.severity-indicator.error {
  background: #ffebe6;
  color: #de350b;
}

.severity-indicator.warning {
  background: #fff4e6;
  color: #ff8b00;
}

.expand-btn {
  background: none;
  border: none;
  color: #5e6c84;
  font-size: 1rem;
  cursor: pointer;
  padding: 0.25rem;
  transition: color 0.2s ease;
}

.expand-btn:hover {
  color: #0052cc;
}

.requirement-details {
  padding: 1.5rem;
}

.validation-issues h4,
.validation-suggestions h4 {
  color: #172b4d;
  font-size: 0.95rem;
  margin: 0 0 1rem 0;
  font-weight: 600;
}

.validation-issue {
  margin-bottom: 1rem;
  padding: 1rem;
  border-radius: 6px;
  border-left: 4px solid;
}

.validation-issue.error {
  background: #ffebe6;
  border-left-color: #de350b;
}

.validation-issue.warning {
  background: #fff4e6;
  border-left-color: #ff8b00;
}

.validation-issue.info {
  background: #f4f8ff;
  border-left-color: #0052cc;
}

.issue-header {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.issue-icon {
  font-size: 1rem;
  margin-top: 0.1rem;
}

.issue-message {
  color: #172b4d;
  font-weight: 500;
  font-size: 0.875rem;
  line-height: 1.4;
}

.issue-suggestion,
.issue-context {
  margin-top: 0.5rem;
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 4px;
  font-size: 0.8rem;
  color: #5e6c84;
  line-height: 1.4;
}

.validation-suggestions {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #dfe1e6;
}

.validation-suggestions ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.validation-suggestions li {
  padding: 0.5rem 0;
  color: #172b4d;
  font-size: 0.875rem;
  line-height: 1.4;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.validation-suggestions li::before {
  content: '💡';
  font-size: 0.875rem;
  margin-top: 0.1rem;
}

/* Conflicts Tab Styles */
.validation-conflicts {
  padding: 2rem;
}

.no-conflicts {
  text-align: center;
  padding: 3rem 2rem;
  color: #5e6c84;
}

.no-conflicts-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.no-conflicts h3 {
  color: #00875a;
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.no-conflicts p {
  font-size: 0.875rem;
  margin: 0;
}

.conflicts-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.conflict-item {
  border: 1px solid #dfe1e6;
  border-radius: 8px;
  background: white;
  overflow: hidden;
}

.conflict-item.high {
  border-left: 4px solid #de350b;
}

.conflict-item.medium {
  border-left: 4px solid #ff8b00;
}

.conflict-item.low {
  border-left: 4px solid #ffab00;
}

.conflict-header {
  padding: 1.5rem;
  background: #fafbfc;
  border-bottom: 1px solid #dfe1e6;
}

.conflict-info {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.conflict-icon {
  font-size: 1.5rem;
  margin-top: 0.25rem;
}

.conflict-details {
  flex: 1;
}

.conflict-type {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #5e6c84;
  margin-bottom: 0.5rem;
}

.conflict-description {
  color: #172b4d;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.4;
}

.conflict-requirements,
.conflict-resolution {
  padding: 1rem 1.5rem;
}

.conflict-requirements {
  border-bottom: 1px solid #dfe1e6;
}

.conflict-requirements h5,
.conflict-resolution h5 {
  color: #172b4d;
  font-size: 0.875rem;
  font-weight: 600;
  margin: 0 0 0.75rem 0;
}

.requirement-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.requirement-tag {
  background: #0052cc;
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

.requirement-tag:hover {
  background: #0747a6;
}

.conflict-resolution p {
  color: #5e6c84;
  font-size: 0.875rem;
  line-height: 1.4;
  margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
  .validation-header {
    padding: 1rem;
  }
  
  .validation-tabs {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .tab-btn {
    border-radius: 6px;
    border: 1px solid #dfe1e6;
    margin-right: 0;
  }
  
  .validation-overview,
  .validation-details,
  .validation-conflicts {
    padding: 1rem;
  }
  
  .summary-stats {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }
  
  .score-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }
  
  .score-label {
    min-width: auto;
  }
  
  .score-count {
    text-align: left;
  }
  
  .requirement-header {
    padding: 1rem;
  }
  
  .requirement-info {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .validation-indicators {
    flex-wrap: wrap;
  }
  
  .conflict-info {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .requirement-tags {
    flex-direction: column;
  }
}
.traceability-matrix {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin: 2rem 0;
  overflow: hidden;
}

.traceability-header {
  background: #f4f5f7;
  padding: 1.5rem 2rem 0;
  border-bottom: 1px solid #dfe1e6;
}

.traceability-header h2 {
  color: #172b4d;
  font-size: 1.5rem;
  margin: 0 0 1rem 0;
  font-weight: 600;
}

.traceability-tabs {
  display: flex;
  gap: 0;
  margin-bottom: -1px;
}

.tab-btn {
  padding: 0.75rem 1.5rem;
  border: 1px solid #dfe1e6;
  border-bottom: none;
  background: white;
  color: #5e6c84;
  font-weight: 500;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: 6px 6px 0 0;
  margin-right: 0.25rem;
}

.tab-btn:hover {
  background: #f4f8ff;
  color: #0052cc;
}

.tab-btn.active {
  background: white;
  color: #172b4d;
  border-color: #0052cc;
  border-bottom: 1px solid white;
  position: relative;
  z-index: 1;
}

/* Summary Stats */
.traceability-summary {
  display: flex;
  gap: 2rem;
  padding: 1.5rem 2rem;
  background: #fafbfc;
  border-bottom: 1px solid #dfe1e6;
  justify-content: center;
  flex-wrap: wrap;
}

.summary-stat {
  text-align: center;
  min-width: 100px;
}

.summary-stat .stat-number {
  font-size: 1.5rem;
  font-weight: 700;
  color: #172b4d;
  display: block;
  margin-bottom: 0.25rem;
}

.summary-stat .stat-label {
  font-size: 0.75rem;
  color: #5e6c84;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Matrix View */
.matrix-view {
  padding: 2rem;
}

.grid-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #dfe1e6;
}

.grid-header h3 {
  color: #172b4d;
  font-size: 1.1rem;
  margin: 0;
  font-weight: 600;
}

.toggle-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #5e6c84;
  cursor: pointer;
}

.toggle-label input[type="checkbox"] {
  margin: 0;
}

.requirements-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 1rem;
}

.requirement-node {
  border: 1px solid #dfe1e6;
  border-radius: 8px;
  background: white;
  cursor: pointer;
  transition: all 0.2s ease;
  overflow: hidden;
}

.requirement-node:hover {
  border-color: #b3d4ff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

.requirement-node.selected {
  border-color: #0052cc;
  box-shadow: 0 0 0 2px rgba(0, 82, 204, 0.2);
}

.node-header {
  background: #fafbfc;
  padding: 1rem;
  border-bottom: 1px solid #dfe1e6;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.node-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.type-icon {
  font-size: 1.2rem;
}

.node-id {
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.75rem;
  background: #172b4d;
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-weight: 500;
}

.node-type {
  font-size: 0.75rem;
  color: #5e6c84;
  font-weight: 500;
  text-transform: capitalize;
}

.coverage-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 80px;
}

.coverage-bar {
  height: 4px;
  border-radius: 2px;
  min-width: 40px;
  transition: width 0.3s ease;
}

.coverage-text {
  font-size: 0.75rem;
  font-weight: 600;
  color: #5e6c84;
  min-width: 30px;
}

.node-content {
  padding: 1rem;
}

.node-title {
  font-weight: 600;
  color: #172b4d;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
  line-height: 1.3;
}

.node-description {
  color: #5e6c84;
  font-size: 0.875rem;
  line-height: 1.4;
  margin-bottom: 1rem;
}

.node-stats {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.node-stats .stat {
  font-size: 0.75rem;
  color: #5e6c84;
  background: #f4f5f7;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-weight: 500;
}

.node-links {
  border-top: 1px solid #dfe1e6;
  padding-top: 1rem;
}

.node-links h5 {
  color: #172b4d;
  font-size: 0.875rem;
  font-weight: 600;
  margin: 0 0 0.75rem 0;
}

.trace-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  background: #f4f8ff;
  border-radius: 4px;
  margin-bottom: 0.5rem;
  font-size: 0.8rem;
}

.link-direction {
  font-size: 1rem;
  color: #0052cc;
  font-weight: bold;
}

.link-type {
  color: #172b4d;
  font-weight: 500;
}

.link-target {
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  color: #0052cc;
  font-weight: 500;
}

.link-strength {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

/* Analysis View */
.analysis-view {
  padding: 2rem;
}

.analysis-sections {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.analysis-section {
  border: 1px solid #dfe1e6;
  border-radius: 8px;
  overflow: hidden;
}

.analysis-section h3 {
  background: #f4f5f7;
  padding: 1rem 1.5rem;
  margin: 0;
  color: #172b4d;
  font-size: 1rem;
  font-weight: 600;
  border-bottom: 1px solid #dfe1e6;
}

.analysis-section p {
  margin: 0;
  padding: 0.5rem 1.5rem;
  color: #5e6c84;
  font-size: 0.875rem;
  background: #fafbfc;
  border-bottom: 1px solid #dfe1e6;
}

.issue-list {
  padding: 1rem;
}

.issue-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem;
  border: 1px solid #dfe1e6;
  border-radius: 6px;
  margin-bottom: 1rem;
  background: white;
}

.issue-item.orphan {
  border-left: 4px solid #ff8b00;
}

.issue-item.gap {
  border-left: 4px solid #ffab00;
}

.issue-item.cycle {
  border-left: 4px solid #de350b;
}

.issue-id {
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.75rem;
  background: #172b4d;
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  width: fit-content;
  font-weight: 500;
}

.issue-title {
  font-weight: 500;
  color: #172b4d;
  font-size: 0.875rem;
}

.issue-action {
  color: #5e6c84;
  font-size: 0.8rem;
  font-style: italic;
}

.missing-types {
  color: #ff8b00;
  font-size: 0.8rem;
  font-weight: 500;
}

.issue-recommendation {
  color: #0052cc;
  font-size: 0.8rem;
  background: #f4f8ff;
  padding: 0.5rem;
  border-radius: 4px;
}

.cycle-title {
  font-weight: 600;
  color: #de350b;
  font-size: 0.875rem;
}

.cycle-path {
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.8rem;
  color: #5e6c84;
  background: #f4f5f7;
  padding: 0.5rem;
  border-radius: 4px;
}

.impact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
  padding: 1rem;
}

.impact-item {
  border: 1px solid #dfe1e6;
  border-radius: 6px;
  padding: 1rem;
  background: white;
}

.impact-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.impact-id {
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.75rem;
  font-weight: 500;
  color: #5e6c84;
}

.risk-badge {
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
}

.impact-title {
  font-weight: 500;
  color: #172b4d;
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

.impact-stats {
  display: flex;
  gap: 1rem;
  font-size: 0.8rem;
  color: #5e6c84;
}

/* Suggestions View */
.suggestions-view {
  padding: 2rem;
}

.no-selection {
  text-align: center;
  padding: 4rem 2rem;
  color: #5e6c84;
}

.no-selection-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.no-selection h3 {
  color: #172b4d;
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.no-selection p {
  font-size: 0.875rem;
  margin: 0;
}

.suggestions-content {
  max-width: 800px;
  margin: 0 auto;
}

.selected-requirement {
  background: #f4f8ff;
  border: 1px solid #b3d4ff;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.selected-requirement h3 {
  color: #0052cc;
  font-size: 1.1rem;
  margin: 0 0 0.5rem 0;
  font-weight: 600;
}

.selected-req-info {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.req-type {
  background: #0052cc;
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: capitalize;
}

.req-title {
  color: #172b4d;
  font-weight: 500;
}

.no-suggestions {
  text-align: center;
  padding: 3rem 2rem;
  color: #5e6c84;
}

.no-suggestions-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.no-suggestions h4 {
  color: #172b4d;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.no-suggestions p {
  font-size: 0.875rem;
  margin: 0;
}

.suggestions-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.suggestion-item {
  border: 1px solid #dfe1e6;
  border-radius: 8px;
  background: white;
  overflow: hidden;
  transition: all 0.2s ease;
}

.suggestion-item:hover {
  border-color: #b3d4ff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.suggestion-header {
  background: #fafbfc;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #dfe1e6;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.suggestion-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.suggestion-target {
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.875rem;
  background: #172b4d;
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-weight: 500;
}

.suggestion-similarity,
.suggestion-confidence {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  background: #f4f5f7;
}

.suggested-link-type {
  font-size: 0.8rem;
  color: #0052cc;
  font-weight: 500;
  background: #f4f8ff;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

.suggestion-content {
  padding: 1rem 1.5rem;
}

.target-title {
  font-weight: 500;
  color: #172b4d;
  margin-bottom: 0.5rem;
}

.matched-terms {
  font-size: 0.8rem;
  color: #5e6c84;
}

.matched-terms strong {
  color: #172b4d;
}

.suggestion-actions {
  padding: 1rem 1.5rem;
  border-top: 1px solid #dfe1e6;
  background: #fafbfc;
  display: flex;
  justify-content: flex-end;
}

.btn-create-link {
  background: #0052cc;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease;
}

.btn-create-link:hover {
  background: #0747a6;
}

/* Responsive Design */
@media (max-width: 768px) {
  .traceability-header {
    padding: 1rem;
  }
  
  .traceability-tabs {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .tab-btn {
    border-radius: 6px;
    border: 1px solid #dfe1e6;
    margin-right: 0;
  }
  
  .traceability-summary {
    padding: 1rem;
    gap: 1rem;
  }
  
  .matrix-view,
  .analysis-view,
  .suggestions-view {
    padding: 1rem;
  }
  
  .requirements-list {
    grid-template-columns: 1fr;
  }
  
  .grid-header {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }
  
  .node-stats {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .impact-grid {
    grid-template-columns: 1fr;
  }
  
  .suggestion-header {
    flex-direction: column;
    align-items: stretch;
  }
  
  .suggestion-info {
    justify-content: space-between;
  }
}
.requirements-search {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin: 2rem 0;
  overflow: hidden;
}

.search-header {
  background: #f4f5f7;
  padding: 1.5rem 2rem 0;
  border-bottom: 1px solid #dfe1e6;
}

.search-header h2 {
  color: #172b4d;
  font-size: 1.5rem;
  margin: 0 0 1rem 0;
  font-weight: 600;
}

.search-tabs {
  display: flex;
  gap: 0;
  margin-bottom: -1px;
}

.tab-btn {
  padding: 0.75rem 1.5rem;
  border: 1px solid #dfe1e6;
  border-bottom: none;
  background: white;
  color: #5e6c84;
  font-weight: 500;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: 6px 6px 0 0;
  margin-right: 0.25rem;
}

.tab-btn:hover {
  background: #f4f8ff;
  color: #0052cc;
}

.tab-btn.active {
  background: white;
  color: #172b4d;
  border-color: #0052cc;
  border-bottom: 1px solid white;
  position: relative;
  z-index: 1;
}

/* Search Content */
.search-content {
  padding: 2rem;
}

.search-input-section {
  margin-bottom: 2rem;
}

.search-input-wrapper {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
}

.search-input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 2px solid #dfe1e6;
  border-radius: 6px;
  font-size: 1rem;
  transition: border-color 0.2s ease;
}

.search-input:focus {
  outline: none;
  border-color: #0052cc;
  box-shadow: 0 0 0 2px rgba(0, 82, 204, 0.2);
}

.advanced-toggle {
  background: #f4f5f7;
  border: 1px solid #dfe1e6;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  color: #5e6c84;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.advanced-toggle:hover {
  background: #e4e6ea;
  color: #172b4d;
}

.search-suggestions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: 0.875rem;
  color: #5e6c84;
}

.suggestion-chip {
  background: #f4f8ff;
  color: #0052cc;
  border: 1px solid #b3d4ff;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.suggestion-chip:hover {
  background: #0052cc;
  color: white;
}

/* Advanced Filters */
.advanced-filters {
  background: #fafbfc;
  border: 1px solid #dfe1e6;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.filter-builder h4,
.active-filters h4 {
  color: #172b4d;
  font-size: 1rem;
  margin: 0 0 1rem 0;
  font-weight: 600;
}

.filter-form {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.filter-form select,
.filter-form input {
  padding: 0.5rem;
  border: 1px solid #dfe1e6;
  border-radius: 4px;
  font-size: 0.875rem;
}

.btn-add-filter {
  background: #0052cc;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease;
}

.btn-add-filter:hover {
  background: #0747a6;
}

.active-filters {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #dfe1e6;
}

.filter-chips {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.filter-chip {
  background: #e3fcef;
  border: 1px solid #79e2a0;
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.filter-text {
  color: #006644;
  font-weight: 500;
}

.remove-filter {
  background: none;
  border: none;
  color: #006644;
  cursor: pointer;
  font-weight: bold;
  padding: 0;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s ease;
}

.remove-filter:hover {
  background: rgba(0, 102, 68, 0.1);
}

.clear-filters {
  background: #ffebe6;
  color: #de350b;
  border: 1px solid #ffbdad;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.clear-filters:hover {
  background: #de350b;
  color: white;
}

/* Results Section */
.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #dfe1e6;
}

.results-info {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.results-count {
  font-weight: 600;
  color: #172b4d;
}

.search-time {
  color: #5e6c84;
  font-size: 0.875rem;
}

.results-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.btn-save-search,
.btn-export {
  background: #f4f5f7;
  color: #5e6c84;
  border: 1px solid #dfe1e6;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-save-search:hover,
.btn-export:hover {
  background: #e4e6ea;
  color: #172b4d;
}

.btn-save-search:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.export-dropdown {
  position: relative;
  display: inline-block;
}

.export-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: white;
  border: 1px solid #dfe1e6;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  min-width: 120px;
  display: none;
}

.export-dropdown:hover .export-menu {
  display: block;
}

.export-menu button {
  display: block;
  width: 100%;
  padding: 0.5rem 1rem;
  border: none;
  background: none;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s ease;
}

.export-menu button:hover {
  background: #f4f5f7;
}

/* Results Layout */
.results-layout {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 2rem;
}

/* Facets Sidebar */
.facets-sidebar {
  background: #fafbfc;
  border: 1px solid #dfe1e6;
  border-radius: 8px;
  padding: 1.5rem;
  height: fit-content;
}

.facets-sidebar h4 {
  color: #172b4d;
  font-size: 1rem;
  margin: 0 0 1rem 0;
  font-weight: 600;
}

.facet-group {
  margin-bottom: 1.5rem;
}

.facet-group h5 {
  color: #5e6c84;
  font-size: 0.875rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
  text-transform: capitalize;
}

.facet-values {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.facet-value {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem;
  border: none;
  background: white;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.facet-value:hover {
  background: #f4f8ff;
  color: #0052cc;
}

.facet-value.selected {
  background: #0052cc;
  color: white;
}

.facet-label {
  font-size: 0.875rem;
}

.facet-count {
  font-size: 0.75rem;
  opacity: 0.8;
}

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

.result-item {
  border: 1px solid #dfe1e6;
  border-radius: 8px;
  padding: 1.5rem;
  background: white;
  cursor: pointer;
  transition: all 0.2s ease;
}

.result-item:hover {
  border-color: #b3d4ff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

.result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.result-id {
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.75rem;
  background: #172b4d;
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-weight: 500;
}

.result-meta {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.priority-badge,
.type-badge,
.status-badge {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-weight: 600;
  text-transform: uppercase;
}

.priority-badge.critical {
  background: #ffebe6;
  color: #de350b;
}

.priority-badge.high {
  background: #fff4e6;
  color: #ff8b00;
}

.priority-badge.medium {
  background: #fff7e6;
  color: #ffc400;
}

.priority-badge.low {
  background: #e3fcef;
  color: #006644;
}

.type-badge {
  background: #f4f8ff;
  color: #0052cc;
}

.status-badge {
  background: #f4f5f7;
  color: #5e6c84;
}

.result-title {
  color: #172b4d;
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 0.75rem 0;
  line-height: 1.3;
}

.result-description {
  color: #5e6c84;
  font-size: 0.875rem;
  line-height: 1.5;
  margin: 0 0 1rem 0;
}

.result-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid #f4f5f7;
}

.result-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tag {
  background: #e4e6ea;
  color: #5e6c84;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
}

.tag-more {
  background: #f4f5f7;
  color: #97a0af;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-style: italic;
}

.result-dates {
  font-size: 0.75rem;
  color: #97a0af;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
  padding: 1rem;
  border-top: 1px solid #dfe1e6;
}

.pagination button {
  background: #f4f5f7;
  border: 1px solid #dfe1e6;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  color: #5e6c84;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pagination button:hover:not(:disabled) {
  background: #e4e6ea;
  color: #172b4d;
}

.pagination button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.page-info {
  color: #5e6c84;
  font-weight: 500;
}

/* No Results */
.no-results {
  text-align: center;
  padding: 3rem 2rem;
  color: #5e6c84;
}

.no-results-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.no-results h3 {
  color: #172b4d;
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.no-results p {
  margin-bottom: 1.5rem;
}

.no-results button {
  background: #0052cc;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease;
}

.no-results button:hover {
  background: #0747a6;
}

/* Saved Searches */
.saved-searches {
  padding: 2rem;
}

.saved-header {
  margin-bottom: 2rem;
}

.saved-header h3 {
  color: #172b4d;
  font-size: 1.25rem;
  margin: 0 0 0.5rem 0;
  font-weight: 600;
}

.saved-header p {
  color: #5e6c84;
  margin: 0;
}

.no-saved-searches {
  text-align: center;
  padding: 3rem 2rem;
  color: #5e6c84;
}

.no-saved-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.no-saved-searches h4 {
  color: #172b4d;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.saved-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.saved-item {
  border: 1px solid #dfe1e6;
  border-radius: 8px;
  padding: 1.5rem;
  background: white;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.saved-info h4 {
  color: #172b4d;
  font-size: 1rem;
  margin: 0 0 0.5rem 0;
  font-weight: 600;
}

.saved-info p {
  color: #5e6c84;
  font-size: 0.875rem;
  margin: 0 0 0.5rem 0;
}

.saved-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.75rem;
  color: #97a0af;
}

.saved-actions {
  display: flex;
  gap: 0.5rem;
}

.btn-load,
.btn-delete {
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-load {
  background: #0052cc;
  color: white;
  border: none;
}

.btn-load:hover {
  background: #0747a6;
}

.btn-delete {
  background: white;
  color: #de350b;
  border: 1px solid #ffbdad;
}

.btn-delete:hover {
  background: #ffebe6;
}

/* Analytics */
.search-analytics {
  padding: 2rem;
}

.search-analytics h3 {
  color: #172b4d;
  font-size: 1.25rem;
  margin: 0 0 2rem 0;
  font-weight: 600;
}

.analytics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.analytics-card {
  background: #fafbfc;
  border: 1px solid #dfe1e6;
  border-radius: 8px;
  padding: 2rem;
  text-align: center;
}

.analytics-number {
  font-size: 2rem;
  font-weight: 700;
  color: #0052cc;
  margin-bottom: 0.5rem;
}

.analytics-label {
  color: #5e6c84;
  font-size: 0.875rem;
  font-weight: 500;
}

/* Save Dialog */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.save-dialog {
  background: white;
  border-radius: 8px;
  padding: 2rem;
  width: 400px;
  max-width: 90vw;
}

.save-dialog h3 {
  color: #172b4d;
  font-size: 1.1rem;
  margin: 0 0 1rem 0;
  font-weight: 600;
}

.save-dialog input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #dfe1e6;
  border-radius: 4px;
  font-size: 1rem;
  margin-bottom: 1.5rem;
}

.dialog-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}

.dialog-actions button {
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dialog-actions button:first-child {
  background: white;
  color: #5e6c84;
  border: 1px solid #dfe1e6;
}

.dialog-actions button:last-child {
  background: #0052cc;
  color: white;
  border: none;
}

/* Responsive Design */
@media (max-width: 768px) {
  .search-header {
    padding: 1rem;
  }
  
  .search-tabs {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .tab-btn {
    border-radius: 6px;
    border: 1px solid #dfe1e6;
    margin-right: 0;
  }
  
  .search-content,
  .saved-searches,
  .search-analytics {
    padding: 1rem;
  }
  
  .search-input-wrapper {
    flex-direction: column;
    align-items: stretch;
  }
  
  .filter-form {
    flex-direction: column;
    align-items: stretch;
  }
  
  .results-header {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }
  
  .results-layout {
    grid-template-columns: 1fr;
  }
  
  .facets-sidebar {
    order: 2;
  }
  
  .saved-item {
    flex-direction: column;
    gap: 1rem;
  }
  
  .saved-actions {
    justify-content: stretch;
  }
  
  .saved-actions button {
    flex: 1;
  }
  
  .analytics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
:root {
  /* Color Palette - Modern SaaS (Indigo/Slate) */
  --color-primary: #4F46E5;
  --color-primary-hover: #4338ca;
  --color-primary-light: #EEF2FF;
  
  --color-secondary: #10B981;
  --color-secondary-hover: #059669;
  
  --color-accent: #8B5CF6; /* Violet */
  
  --color-background: #F8FAFC; /* Slate 50 */
  --color-surface: #FFFFFF;
  --color-surface-glass: rgba(255, 255, 255, 0.7);
  
  --color-text-main: #0F172A; /* Slate 900 */
  --color-text-secondary: #334155; /* Slate 700 */
  --color-text-muted: #64748B; /* Slate 500 */
  --color-text-inverse: #FFFFFF;
  
  --color-border: #E2E8F0; /* Slate 200 */
  --color-border-hover: #CBD5E1; /* Slate 300 */
  
  --color-danger: #EF4444;
  --color-warning: #F59E0B;
  --color-success: #10B981;
  
  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  
  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --shadow-glow: 0 0 15px rgba(79, 70, 229, 0.3);
  
  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Z-Index */
  --z-header: 50;
  --z-sidebar: 40;
  --z-modal: 100;
  --z-toast: 110;
}

body {
  background-color: var(--color-background);
  color: var(--color-text-main);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Glassmorphism Utilities */
.glass-panel {
  background: var(--color-surface-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.glass-card {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: var(--shadow-md);
  border-radius: var(--radius-lg);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-text-muted);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background-color: #f4f5f7;
  color: #172b4d;
}

.app-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.app-header {
  margin-bottom: 3rem;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 2rem;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.header-text {
  text-align: left;
}

.header-text h1 {
  font-size: 2.5rem;
  color: #0052cc;
  margin-bottom: 0.5rem;
}

.header-text p {
  font-size: 1.1rem;
  color: #5e6c84;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.mode-selector {
  display: flex;
  background: #f4f5f7;
  border-radius: 6px;
  padding: 4px;
  gap: 4px;
}

.mode-button {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 4px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  background: transparent;
  color: #5e6c84;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.mode-button:hover {
  background: #e4e6ea;
  color: #172b4d;
}

.mode-button.active {
  background: #0052cc;
  color: white;
  box-shadow: 0 1px 3px rgba(0, 82, 204, 0.3);
}

.provider-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: #f4f5f7;
  border-radius: 4px;
  font-size: 0.9rem;
}

.provider-label {
  color: #6b778c;
  font-weight: 500;
}

.provider-name {
  color: #0052cc;
  font-weight: 600;
}

.provider-count {
  color: #5e6c84;
  font-size: 0.8rem;
}

.settings-button {
  padding: 0.75rem 1rem;
  background: #0052cc;
  color: white;
  border: none;
  border-radius: 4px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.settings-button:hover {
  background: #0065ff;
  transform: translateY(-1px);
}

.settings-button:active {
  transform: translateY(0);
}

.project-selector {
  margin-bottom: 2rem;
}

.project-selector label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.project-selector select {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid #dfe1e6;
  border-radius: 3px;
  font-size: 1rem;
  background-color: white;
}

.upload-container {
  margin-bottom: 2rem;
}

.upload-dropzone {
  border: 2px dashed #c1c7d0;
  border-radius: 8px;
  padding: 3rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background-color: #fafbfc;
}

.upload-dropzone:hover {
  border-color: #0052cc;
  background-color: #f0f9ff;
}

.upload-icon {
  fill: #5e6c84;
  margin-bottom: 1rem;
}

.upload-hint {
  color: #5e6c84;
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

.upload-formats {
  color: #97a0af;
  font-size: 0.85rem;
  margin-top: 1rem;
}

.processing-status {
  text-align: center;
  padding: 2rem;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #0052cc;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.processing-steps {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 2rem;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0.5;
}

.step.active {
  opacity: 1;
}

.step-icon {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.results-container {
  background-color: white;
  border-radius: 8px;
  padding: 2rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.results-header {
  margin-bottom: 2rem;
}

.results-header h2 {
  color: #00875a;
  margin-bottom: 0.5rem;
}

.results-summary {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
}

.summary-card {
  flex: 1;
  padding: 1rem;
  background-color: #f4f5f7;
  border-radius: 4px;
  text-align: center;
}

.summary-label {
  display: block;
  color: #5e6c84;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.summary-value {
  display: block;
  font-size: 2rem;
  font-weight: bold;
  color: #172b4d;
}

.issues-list {
  margin-top: 2rem;
}

.issue-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid #dfe1e6;
  border-radius: 4px;
  margin-bottom: 0.5rem;
}

.issue-key {
  font-weight: 600;
  color: #0052cc;
}

.issue-summary {
  flex: 1;
}

.issue-type {
  padding: 0.25rem 0.5rem;
  background-color: #f4f5f7;
  border-radius: 3px;
  font-size: 0.85rem;
}

.error-message {
  padding: 1rem;
  background-color: #ffebe6;
  border: 1px solid #ff8b00;
  border-radius: 4px;
  color: #bf2600;
  margin-top: 1rem;
}

/* Content Editor Styles */
.content-editor {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin-bottom: 2rem;
}

.editor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid #dfe1e6;
}

.editor-header h3 {
  margin: 0;
  color: #172b4d;
}

.editor-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.editor-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  padding: 1.5rem;
}

.editor-main {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.requirements-textarea {
  width: 100%;
  padding: 1rem;
  border: 2px solid #dfe1e6;
  border-radius: 6px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  resize: vertical;
  min-height: 300px;
  transition: border-color 0.2s ease;
}

.requirements-textarea:focus {
  outline: none;
  border-color: #0052cc;
  box-shadow: 0 0 0 2px rgba(0, 82, 204, 0.2);
}

.requirements-textarea::placeholder {
  color: #97a0af;
  font-style: italic;
}

.upload-alternative {
  padding: 1rem;
  background-color: #f4f5f7;
  border-radius: 6px;
  text-align: center;
}

.upload-alternative p {
  margin: 0 0 1rem 0;
  color: #5e6c84;
  font-size: 0.9rem;
}

.editor-sidebar {
  border-left: 1px solid #dfe1e6;
  padding-left: 1.5rem;
}

/* Button Styles */
.btn-primary, .btn-secondary {
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 2px solid;
}

.btn-primary {
  background-color: #0052cc;
  border-color: #0052cc;
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background-color: #0747a6;
  border-color: #0747a6;
}

.btn-primary:disabled {
  background-color: #f4f5f7;
  border-color: #dfe1e6;
  color: #97a0af;
  cursor: not-allowed;
}

.btn-secondary {
  background-color: white;
  border-color: #dfe1e6;
  color: #5e6c84;
}

.btn-secondary:hover {
  border-color: #0052cc;
  color: #0052cc;
}

/* Button Component Styles */
.btn {
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 2px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  line-height: 1.4;
}

.btn-primary {
  background: #0052cc;
  border-color: #0052cc;
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background: #0747a6;
  border-color: #0747a6;
}

.btn-secondary {
  background: white;
  border-color: #dfe1e6;
  color: #5e6c84;
}

.btn-secondary:hover:not(:disabled) {
  border-color: #0052cc;
  color: #0052cc;
}

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

.btn-danger:hover:not(:disabled) {
  background: #bf2600;
  border-color: #bf2600;
}

.btn-success {
  background: #00875a;
  border-color: #00875a;
  color: white;
}

.btn-success:hover:not(:disabled) {
  background: #006644;
  border-color: #006644;
}

.btn-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
}

.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
}

.btn-disabled,
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-loading {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Inline Edit Component Styles */
.inline-edit-input {
  width: 100%;
  border: 2px solid #0052cc;
  border-radius: 4px;
  padding: 0.25rem 0.5rem;
  font-family: inherit;
  font-size: inherit;
  color: #172b4d;
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 82, 204, 0.2);
}

.inline-edit-textarea {
  resize: vertical;
  min-height: 80px;
}

.inline-edit-display {
  display: inline;
}

.inline-edit-clickable {
  cursor: pointer;
  border-radius: 3px;
  padding: 1px 4px;
  margin: -1px -4px;
  transition: background 0.15s;
}

.inline-edit-clickable:hover {
  background: rgba(0, 0, 0, 0.05);
}

.inline-edit-placeholder {
  color: #97a0af;
}

/* T-Shirt Size Select Styles */
.tshirt-select {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 2px 6px;
  border-radius: 4px;
  border: 2px solid #0052cc;
  outline: none;
  background: white;
  color: #172b4d;
  cursor: pointer;
}

.tshirt-select:focus {
  box-shadow: 0 0 0 2px rgba(0, 82, 204, 0.2);
}

.tshirt-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  line-height: 1.4;
}

.tshirt-clickable {
  cursor: pointer;
  transition: opacity 0.15s;
}

.tshirt-clickable:hover {
  opacity: 0.8;
}

.tshirt-xs { background: #e3fcef; color: #006644; }
.tshirt-s  { background: #deebff; color: #0747a6; }
.tshirt-m  { background: #fff3e0; color: #ff8b00; }
.tshirt-l  { background: #ffebe6; color: #de350b; }
.tshirt-xl { background: #ffebe6; color: #bf2600; }
.tshirt-xxl { background: #f3f0ff; color: #6554c0; }
.tshirt-none { background: #f4f5f7; color: #5e6c84; }

/* Sub-tab Navigation */
.sub-tabs {
  display: flex;
  border-bottom: 2px solid #dfe1e6;
  margin-bottom: 1.5rem;
  gap: 0;
}

.sub-tab {
  padding: 0.75rem 1.25rem;
  border: none;
  background: transparent;
  color: #5e6c84;
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
}

.sub-tab:hover {
  color: #172b4d;
  background: #f4f5f7;
}

.sub-tab.active {
  color: #0052cc;
  border-bottom-color: #0052cc;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .editor-content {
    grid-template-columns: 1fr;
  }
  
  .editor-sidebar {
    border-left: none;
    border-top: 1px solid #dfe1e6;
    padding-left: 0;
    padding-top: 1.5rem;
  }
}

@media (max-width: 768px) {
  .editor-header {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }
  
  .editor-actions {
    justify-content: center;
  }
  
  .content-editor {
    margin: 1rem;
  }
  
  .editor-content {
    padding: 1rem;
  }
}

/* Upload Container Styles */
.upload-container {
  margin: 1rem 0;
}

.upload-dropzone {
  border: 2px dashed #dfe1e6;
  border-radius: 8px;
  padding: 2rem;
  text-align: center;
  background: #fafbfc;
  cursor: pointer;
  transition: all 0.3s ease;
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.upload-dropzone:hover:not(.disabled) {
  border-color: #0052cc;
  background: #f4f8ff;
}

.upload-dropzone.drag-over {
  border-color: #0052cc;
  background: #e8f4ff;
  transform: scale(1.02);
}

.upload-dropzone.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: #f4f5f7;
}

.upload-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.7;
}

.upload-dropzone h3 {
  color: #172b4d;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.upload-hint {
  color: #5e6c84;
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

.upload-formats {
  color: #6b778c;
  font-size: 0.8rem;
  margin-bottom: 0.5rem;
}

.upload-limit {
  color: #ff8b00;
  font-size: 0.75rem;
  font-weight: 500;
  margin: 0;
}

.selected-files {
  margin-top: 1rem;
  border: 1px solid #dfe1e6;
  border-radius: 6px;
  background: white;
  overflow: hidden;
}

.selected-files h4 {
  background: #f4f5f7;
  padding: 1rem;
  margin: 0;
  color: #172b4d;
  font-size: 0.95rem;
  font-weight: 600;
  border-bottom: 1px solid #dfe1e6;
}

.files-list {
  max-height: 200px;
  overflow-y: auto;
}

.file-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f4f5f7;
  transition: background 0.2s ease;
}

.file-item:hover {
  background: #fafbfc;
}

.file-item:last-child {
  border-bottom: none;
}

.file-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
}

.file-icon {
  font-size: 1.25rem;
}

.file-details {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.file-name {
  color: #172b4d;
  font-weight: 500;
  font-size: 0.875rem;
}

.file-size {
  color: #5e6c84;
  font-size: 0.75rem;
}

.remove-file {
  background: none;
  border: none;
  color: #de350b;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: bold;
  transition: all 0.2s ease;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.remove-file:hover:not(:disabled) {
  background: #ffebe6;
  color: #bf2600;
}

.remove-file:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Enhanced Upload Responsive Design */
@media (max-width: 768px) {
  .upload-dropzone {
    padding: 1.5rem 1rem;
    min-height: 120px;
  }
  
  .upload-dropzone h3 {
    font-size: 1rem;
  }
  
  .file-item {
    padding: 0.5rem;
  }
  
  .file-details {
    min-width: 0;
  }
  
  .file-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}
/* Smart Templates Styles */
.smart-templates {
  background-color: white;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.templates-header {
  margin-bottom: 1.5rem;
  text-align: center;
}

.templates-header h3 {
  color: #172b4d;
  margin-bottom: 0.5rem;
}

.templates-header p {
  color: #5e6c84;
  font-size: 0.9rem;
}

.smart-suggestions {
  background-color: #e3fcef;
  border: 1px solid #79e2a0;
  border-radius: 6px;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.smart-suggestions h4 {
  color: #00875a;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.suggestion-item {
  color: #006644;
  font-size: 0.85rem;
  margin-bottom: 0.25rem;
  padding: 0.25rem 0;
  border-left: 3px solid #00875a;
  padding-left: 0.75rem;
}

.templates-controls {
  margin-bottom: 1.5rem;
}

.template-search {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid #dfe1e6;
  border-radius: 6px;
  font-size: 1rem;
  margin-bottom: 1rem;
  transition: border-color 0.2s ease;
}

.template-search:focus {
  outline: none;
  border-color: #0052cc;
  box-shadow: 0 0 0 2px rgba(0, 82, 204, 0.2);
}

.category-filters {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.category-filter {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border: 2px solid #dfe1e6;
  border-radius: 20px;
  background-color: white;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.85rem;
}

.category-filter:hover {
  border-color: #0052cc;
  background-color: #f0f9ff;
}

.category-filter.active {
  border-color: #0052cc;
  background-color: #0052cc;
  color: white;
}

.category-icon {
  font-size: 1rem;
}

.templates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
}

.template-card {
  border: 2px solid #dfe1e6;
  border-radius: 8px;
  padding: 1.25rem;
  background-color: #fafbfc;
  transition: all 0.2s ease;
  cursor: pointer;
}

.template-card:hover {
  border-color: #0052cc;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.template-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.template-icon {
  font-size: 1.5rem;
}

.template-name {
  color: #172b4d;
  margin: 0;
  font-size: 1.1rem;
}

.template-description {
  color: #5e6c84;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  line-height: 1.4;
}

.template-preview {
  background-color: #f4f5f7;
  border-radius: 4px;
  padding: 0.75rem;
  margin-bottom: 1rem;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.8rem;
  color: #5e6c84;
  overflow: hidden;
}

.template-actions {
  display: flex;
  gap: 0.5rem;
}

.btn-secondary {
  flex: 1;
  padding: 0.5rem 1rem;
  border: 2px solid #dfe1e6;
  border-radius: 4px;
  background-color: white;
  color: #5e6c84;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  border-color: #0052cc;
  color: #0052cc;
}

.btn-primary {
  flex: 1;
  padding: 0.5rem 1rem;
  border: 2px solid #0052cc;
  border-radius: 4px;
  background-color: #0052cc;
  color: white;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s ease;
}

.btn-primary:hover {
  background-color: #0747a6;
  border-color: #0747a6;
}

.variable-form-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-content {
  background-color: white;
  border-radius: 8px;
  padding: 2rem;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #dfe1e6;
}

.modal-header h3 {
  color: #172b4d;
  margin: 0;
}

.modal-header button {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #5e6c84;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

.modal-header button:hover {
  background-color: #f4f5f7;
}

.variable-form {
  margin-bottom: 1.5rem;
}

.variable-input {
  margin-bottom: 1rem;
}

.variable-input label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: #172b4d;
  text-transform: capitalize;
}

.variable-input input {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid #dfe1e6;
  border-radius: 4px;
  font-size: 1rem;
  transition: border-color 0.2s ease;
}

.variable-input input:focus {
  outline: none;
  border-color: #0052cc;
  box-shadow: 0 0 0 2px rgba(0, 82, 204, 0.2);
}

.modal-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  padding-top: 1rem;
  border-top: 1px solid #dfe1e6;
}

.modal-actions .btn-secondary,
.modal-actions .btn-primary {
  flex: 0 0 auto;
  min-width: 100px;
}

/* Quality Score Integration */
.quality-score-indicator {
  background-color: white;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  max-width: 100%;
  overflow: hidden;
}

.quality-score-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.quality-score-header h3 {
  color: #172b4d;
  margin: 0;
}

.overall-score {
  text-align: right;
}

.score-value {
  display: block;
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 0.25rem;
}

.score-label {
  display: block;
  font-size: 0.85rem;
  opacity: 0.8;
}

.quality-metrics {
  margin-bottom: 1.5rem;
}

.metric {
  margin-bottom: 1rem;
}

.metric-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.metric-name {
  font-weight: 500;
  color: #172b4d;
}

.metric-value {
  font-weight: 600;
}

.metric-bar {
  height: 6px;
  background-color: #f4f5f7;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.metric-fill {
  height: 100%;
  transition: width 0.3s ease;
}

.metric-hint {
  font-size: 0.8rem;
  color: #5e6c84;
  margin: 0;
  font-style: italic;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.quality-suggestions {
  padding-top: 1rem;
  border-top: 1px solid #dfe1e6;
}

.quality-suggestions h4 {
  color: #172b4d;
  margin-bottom: 0.75rem;
  font-size: 1rem;
}

.quality-suggestions ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.quality-suggestions li {
  padding: 0.5rem 0;
  color: #5e6c84;
  font-size: 0.9rem;
  line-height: 1.4;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Responsive Design */
@media (max-width: 768px) {
  .templates-grid {
    grid-template-columns: 1fr;
  }
  
  .category-filters {
    flex-direction: column;
  }
  
  .category-filter {
    justify-content: center;
  }
  
  .modal-content {
    width: 95%;
    padding: 1rem;
  }
  
  .modal-actions {
    flex-direction: column;
  }
}
