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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f5f7fa;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.header {
  background: #1a1a2e;
  color: white;
  padding: 15px 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: white;
  text-decoration: none;
}

.nav a {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  margin-left: 20px;
}

.nav a:hover {
  color: white;
}

/* Main content */
.main {
  flex: 1;
  padding: 40px 0;
}

h1 {
  margin-bottom: 10px;
  color: #1a1a2e;
}

.subtitle {
  color: #666;
  margin-bottom: 30px;
}

.breadcrumb {
  margin-bottom: 20px;
  color: #666;
}

.breadcrumb a {
  color: #4a6fa5;
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

/* Features grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.feature-card {
  background: white;
  border-radius: 8px;
  padding: 25px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  border: 1px solid #e1e5eb;
  transition: transform 0.2s, box-shadow 0.2s;
}

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

.feature-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.feature-card h3 {
  color: #1a1a2e;
  margin-bottom: 10px;
}

.feature-card p {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 15px;
}

.badge {
  display: inline-block;
  background: #4a6fa5;
  color: white;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 500;
}

.source-types {
  margin-top: 10px;
}

.tag {
  display: inline-block;
  background: #e1e5eb;
  color: #555;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 0.75rem;
  margin-right: 5px;
}

/* Matching panel */
.matching-panel {
  background: white;
  border-radius: 8px;
  padding: 30px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  border: 1px solid #e1e5eb;
}

.matching-form {
  margin-bottom: 30px;
}

.form-row {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
}

.form-group {
  flex: 1;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
  color: #333;
}

.form-group input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
}

.form-group input:focus {
  outline: none;
  border-color: #4a6fa5;
  box-shadow: 0 0 0 3px rgba(74,111,165,0.1);
}

.form-group small {
  display: block;
  margin-top: 5px;
  color: #888;
  font-size: 0.85rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn:active {
  transform: translateY(1px);
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.btn-primary {
  background: linear-gradient(135deg, #4a6fa5 0%, #3a5a8a 100%);
  color: white;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #3a5a8a 0%, #2a4a7a 100%);
  box-shadow: 0 4px 8px rgba(74, 111, 165, 0.3);
}

.btn-primary:disabled {
  background: linear-gradient(135deg, #a0b0c0 0%, #8a9aaa 100%);
  cursor: not-allowed;
  box-shadow: none;
}

.btn-secondary {
  background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
  color: white;
}

.btn-secondary:hover {
  background: linear-gradient(135deg, #5a6268 0%, #4a5258 100%);
  box-shadow: 0 4px 8px rgba(108, 117, 125, 0.3);
}

.btn-secondary:disabled {
  background: linear-gradient(135deg, #adb5bd 0%, #9aa2aa 100%);
  cursor: not-allowed;
  box-shadow: none;
}

.btn-warning {
  background: linear-gradient(135deg, #fd7e14 0%, #e56b00 100%);
  color: white;
}

.btn-warning:hover {
  background: linear-gradient(135deg, #e56b00 0%, #cc5f00 100%);
  box-shadow: 0 4px 8px rgba(253, 126, 20, 0.3);
}

.btn-warning:disabled {
  background: linear-gradient(135deg, #fdba8c 0%, #f5a66a 100%);
  cursor: not-allowed;
  box-shadow: none;
}

.btn-success {
  background: linear-gradient(135deg, #28a745 0%, #1e8235 100%);
  color: white;
}

.btn-success:hover {
  background: linear-gradient(135deg, #1e8235 0%, #166d2b 100%);
  box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

.btn-whatsapp {
  background: linear-gradient(135deg, #7dd3a8 0%, #5bbf91 100%);
  color: white;
}

.btn-whatsapp:hover {
  background: linear-gradient(135deg, #5bbf91 0%, #4aaf80 100%);
  box-shadow: 0 4px 8px rgba(91, 191, 145, 0.4);
}

.btn-whatsapp:disabled {
  background: #d0d0d0;
  color: #888;
  cursor: not-allowed;
  box-shadow: none;
  opacity: 0.6;
}

.btn-danger {
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
  color: white;
}

.btn-danger:hover {
  background: linear-gradient(135deg, #c82333 0%, #b21f2d 100%);
  box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}

.btn-danger:disabled {
  background: #d0d0d0;
  color: #888;
  cursor: not-allowed;
  box-shadow: none;
  opacity: 0.6;
}

/* Form actions container */
.form-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

/* Status panel */
.status-panel {
  margin-top: 30px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 6px;
}

.status-panel h3 {
  margin-bottom: 15px;
  font-size: 1rem;
}

.progress-container {
  height: 20px;
  background: #e1e5eb;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 10px;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #4a6fa5, #6a8fc5);
  border-radius: 10px;
  transition: width 0.3s ease;
}

.status-message {
  color: #666;
  font-size: 0.9rem;
}

/* Results panel */
.results-panel {
  margin-top: 30px;
  padding: 20px;
  background: #e8f5e9;
  border-radius: 6px;
  border: 1px solid #c8e6c9;
}

.results-panel h3 {
  margin-bottom: 15px;
  font-size: 1rem;
  color: #2e7d32;
}

.results-content {
  margin-bottom: 20px;
}

.result-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #c8e6c9;
}

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

.result-label {
  font-weight: 500;
}

.result-value {
  color: #2e7d32;
}

.result-value.warning {
  color: #f57c00;
}

/* Error panel */
.error-panel {
  margin-top: 30px;
  padding: 20px;
  background: #ffebee;
  border-radius: 6px;
  border: 1px solid #ffcdd2;
}

.error-panel h3 {
  margin-bottom: 10px;
  font-size: 1rem;
  color: #c62828;
}

.error-message {
  color: #c62828;
}

/* Error page */
.error-page {
  text-align: center;
  padding: 60px 20px;
}

.error-page h1 {
  font-size: 4rem;
  color: #c62828;
  margin-bottom: 20px;
}

.error-page p {
  margin-bottom: 30px;
  color: #666;
}

.error-stack {
  margin-top: 30px;
  padding: 20px;
  background: #f5f5f5;
  border-radius: 4px;
  text-align: left;
  overflow-x: auto;
  font-size: 0.85rem;
}

/* Hidden utility */
.hidden {
  display: none !important;
}

/* Footer */
.footer {
  background: #1a1a2e;
  color: rgba(255,255,255,0.7);
  padding: 20px 0;
  text-align: center;
  font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 600px) {
  .form-row {
    flex-direction: column;
  }

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