* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", sans-serif;
  background: linear-gradient(135deg, #1a1a1a 0%, #000000 50%, #1a1a1a 100%);
  min-height: 100vh;
  color: white;
  overflow-x: hidden;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem;
}

/* Header */
.header {
  text-align: center;
  margin-bottom: 2rem;
  padding: 2rem 0;
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.logo-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #ff0050, #25f4ee);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.header h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 900;
  background: linear-gradient(135deg, #ff0050, #8b5cf6, #25f4ee);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header h2 {
  font-size: clamp(1.2rem, 3vw, 1.5rem);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.header p {
  color: #9ca3af;
  font-size: clamp(0.9rem, 2vw, 1.1rem);
  max-width: 600px;
  margin: 0 auto;
}

/* Cotação Card */
.cotacao-card {
  background: rgba(31, 41, 55, 0.8);
  border: 1px solid rgba(75, 85, 99, 0.5);
  border-radius: 16px;
  padding: 1.5rem;
  margin: 0 auto 2rem;
  max-width: 500px;
  width: 100%;
  backdrop-filter: blur(20px);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.card-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #10b981, #059669);
  flex-shrink: 0;
}

.card-header h3 {
  font-size: 1.1rem;
  font-weight: 600;
}

.input-group {
  display: flex;
  gap: 0.75rem;
  align-items: end;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.input-group label {
  color: #d1d5db;
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
  display: block;
  white-space: nowrap;
}

.input-wrapper {
  flex: 1;
  min-width: 120px;
}

.cotacao-input {
  width: 100%;
  background: rgba(55, 65, 81, 0.8);
  border: 1px solid #4b5563;
  border-radius: 8px;
  padding: 0.75rem;
  color: white;
  font-size: 1.1rem;
  font-weight: 700;
}

.cotacao-input:focus {
  outline: none;
  border-color: #ff0050;
  box-shadow: 0 0 0 3px rgba(255, 0, 80, 0.1);
}

.btn-atualizar {
  background: linear-gradient(135deg, #ff0050, #25f4ee);
  border: none;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.btn-atualizar:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 0, 80, 0.3);
}

.cotacao-display {
  background: linear-gradient(135deg, rgba(255, 0, 80, 0.1), rgba(37, 244, 238, 0.1));
  border: 1px solid rgba(255, 0, 80, 0.2);
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
}

.cotacao-display p {
  font-weight: 600;
  font-size: 1.1rem;
}

.cotacao-display span {
  font-size: 1.5rem;
  font-weight: 900;
  background: linear-gradient(135deg, #ff0050, #25f4ee);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Debug Info */
.debug-info {
  background: rgba(31, 41, 55, 0.8);
  border: 1px solid rgba(75, 85, 99, 0.5);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  backdrop-filter: blur(20px);
}

.debug-info h3 {
  color: #fbbf24;
  margin-bottom: 1rem;
}

#debug-content {
  color: #d1d5db;
  font-family: monospace;
  font-size: 0.9rem;
  white-space: pre-wrap;
  max-height: 300px;
  overflow-y: auto;
}

/* Load Data Section */
.load-data-section {
  text-align: center;
  margin-bottom: 2rem;
}

.btn-load-data {
  background: linear-gradient(135deg, #8b5cf6, #3b82f6);
  border: none;
  border-radius: 16px;
  padding: 1.5rem 3rem;
  color: white;
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 8px 30px rgba(139, 92, 246, 0.3);
}

.btn-load-data:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 15px 40px rgba(139, 92, 246, 0.4);
}

.btn-load-data:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.load-description {
  color: #9ca3af;
  margin-top: 1rem;
  font-size: 1rem;
}

/* Loading State */
.loading-state {
  background: rgba(31, 41, 55, 0.8);
  border: 1px solid rgba(75, 85, 99, 0.5);
  border-radius: 16px;
  padding: 3rem;
  text-align: center;
  backdrop-filter: blur(20px);
  margin-bottom: 2rem;
}

.loading-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(59, 130, 246, 0.2));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-size: 2rem;
  color: #8b5cf6;
}

.loading-state h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.loading-state p {
  color: #9ca3af;
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.loading-details {
  color: #d1d5db;
  font-family: monospace;
  font-size: 0.9rem;
  text-align: left;
  background: rgba(0, 0, 0, 0.3);
  padding: 1rem;
  border-radius: 8px;
  max-height: 200px;
  overflow-y: auto;
}

/* Summary Section */
.summary-section {
  margin-bottom: 3rem;
  animation: slideUp 0.7s ease-out;
}

.summary-section h2 {
  text-align: center;
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 2rem;
  background: linear-gradient(135deg, #ff0050, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.summary-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.summary-card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 16px;
  padding: 2rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.summary-card:hover {
  transform: translateY(-5px);
}

.summary-icon {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: white;
  flex-shrink: 0;
}

.summary-card.cost .summary-icon {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}

.summary-card.conversions .summary-icon {
  background: linear-gradient(135deg, #10b981, #059669);
}

.summary-card.roas .summary-icon {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.summary-card.ctr .summary-icon {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.summary-content {
  flex: 1;
}

.summary-label {
  color: #6b7280;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.summary-value {
  color: #111827;
  font-size: 2rem;
  font-weight: 800;
  font-family: "Monaco", monospace;
  line-height: 1;
}

.summary-value-eur {
  color: #6b7280;
  font-size: 1rem;
  font-weight: 600;
  font-family: "Monaco", monospace;
}

.summary-value-brl {
  color: #111827;
  font-size: 1.8rem;
  font-weight: 800;
  font-family: "Monaco", monospace;
  line-height: 1;
}

.summary-subtitle {
  color: #9ca3af;
  font-size: 0.8rem;
  margin-top: 0.25rem;
}

/* Campaigns Table */
.campaigns-table {
  margin-bottom: 3rem;
  animation: slideUp 0.7s ease-out 0.2s both;
}

.campaigns-table h2 {
  text-align: center;
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 2rem;
  background: linear-gradient(135deg, #25f4ee, #3b82f6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.table-container {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
  overflow-x: auto;
}

.campaigns-table-element {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  min-width: 1200px;
}

.campaigns-table-element th {
  background: #f8f9fa;
  color: #374151;
  font-weight: 600;
  padding: 1rem 0.75rem;
  text-align: left;
  border-bottom: 2px solid #e5e7eb;
  font-size: 0.8rem;
  white-space: nowrap;
}

.campaigns-table-element td {
  padding: 1rem 0.75rem;
  color: #374151;
  border-bottom: 1px solid #f3f4f6;
  white-space: nowrap;
}

.campaigns-table-element tr:hover {
  background: #f9fafb;
}

.campaigns-table-element tr:last-child td {
  border-bottom: none;
}

/* Status badges */
.status-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.status-active {
  background: #dcfce7;
  color: #166534;
}

.status-paused {
  background: #fef3c7;
  color: #92400e;
}

.status-ended {
  background: #fee2e2;
  color: #991b1b;
}

/* Empty State */
.empty-state {
  background: rgba(31, 41, 55, 0.5);
  border: 1px solid rgba(75, 85, 99, 0.5);
  border-radius: 16px;
  padding: 4rem 2rem;
  text-align: center;
  backdrop-filter: blur(20px);
}

.empty-icon {
  width: 96px;
  height: 96px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(59, 130, 246, 0.2));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-size: 3rem;
  color: #8b5cf6;
}

.empty-state h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.empty-state p {
  color: #9ca3af;
  font-size: 1.1rem;
  max-width: 400px;
  margin: 0 auto;
}

/* Animations */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive */
@media (max-width: 768px) {
  .container {
    padding: 0.5rem;
  }

  .cotacao-card {
    padding: 1rem;
  }

  .input-group {
    flex-direction: column;
    align-items: stretch;
  }

  .summary-cards {
    grid-template-columns: 1fr;
  }

  .summary-card {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  .campaigns-table-element th,
  .campaigns-table-element td {
    padding: 0.5rem 0.25rem;
    font-size: 0.75rem;
  }

  .btn-load-data {
    padding: 1rem 2rem;
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .input-wrapper {
    min-width: 100%;
  }

  .btn-atualizar {
    width: 100%;
    margin-top: 0.5rem;
  }

  .summary-value,
  .summary-value-brl {
    font-size: 1.5rem;
  }
}
