/* Estilos personalizados para o Visualizador PostgreSQL */

body {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.container, .container-fluid {
  padding-top: 20px;
  padding-bottom: 20px;
}

.card {
  border: none;
  border-radius: 15px;
  overflow: hidden;
}

.card-header {
  padding: 1.5rem;
  border-bottom: 2px solid #dee2e6;
}

.card-body {
  padding: 2rem;
}

.form-control:focus,
.form-select:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #5568d3 0%, #65408b 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-success {
  background: linear-gradient(135deg, #56ab2f 0%, #a8e063 100%);
  border: none;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-success:hover {
  background: linear-gradient(135deg, #4a9628 0%, #96c957 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(86, 171, 47, 0.4);
}

.table {
  margin-bottom: 0;
}

.table thead th {
  position: sticky;
  top: 0;
  background-color: #212529;
  color: white;
  border-color: #454d55;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.875rem;
  letter-spacing: 0.5px;
}

.table tbody tr {
  transition: background-color 0.2s;
}

.table tbody tr:hover {
  background-color: #f8f9fa;
  cursor: default;
}

.table td {
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}

.table-responsive {
  max-height: 600px;
  overflow-y: auto;
}

.pagination {
  margin-bottom: 0;
}

.page-link {
  color: #667eea;
  border-color: #dee2e6;
}

.page-link:hover {
  color: #5568d3;
  background-color: #e9ecef;
  border-color: #dee2e6;
}

.page-item.active .page-link {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-color: #667eea;
}

.alert {
  border-radius: 10px;
  border: none;
}

.navbar {
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Animações */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card {
  animation: fadeIn 0.5s ease-out;
}

/* Loading spinner customizado */
.spinner-border {
  width: 3rem;
  height: 3rem;
  border-width: 0.3rem;
}

/* Responsividade */
@media (max-width: 768px) {
  .card-body {
    padding: 1rem;
  }

  .table {
    font-size: 0.875rem;
  }

  .table td {
    max-width: 150px;
  }

  .pagination {
    font-size: 0.875rem;
  }
}

/* Melhorias de acessibilidade */
.form-label {
  font-weight: 500;
  color: #495057;
  margin-bottom: 0.5rem;
}

.form-control::placeholder {
  color: #adb5bd;
}

/* Estados de loading */
#loadingDiv {
  min-height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* Estilo para valores NULL */
.text-muted {
  font-style: italic;
}
