/* ============================================================
   VitaPel - Sistema UX/UI Aprimorado
   Fontes Legíveis, Animações e Interações Modernas
   ============================================================ */

/* ============================================================
   1. TIPOGRAFIA AVANÇADA - FONTES MAIS LEGÍVEIS
   ============================================================ */

/* Importar fontes modernas e altamente legíveis */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

/* Aplicar fonte mais legível em todo o sistema */
body {
  font-family: 'Inter', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  letter-spacing: -0.011em;
}

/* Hierarquia de títulos melhorada */
h1, .h1 {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-weight: 800;
  font-size: 2.75rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--vitapel-petroleum);
  margin-bottom: 1.5rem;
  animation: fadeInUp 0.6s ease-out;
}

h2, .h2 {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-weight: 700;
  font-size: 2.25rem;
  line-height: 1.3;
  letter-spacing: -0.019em;
  color: var(--vitapel-petroleum);
  margin-bottom: 1.25rem;
  animation: fadeInUp 0.6s ease-out;
}

h3, .h3 {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-weight: 700;
  font-size: 1.875rem;
  line-height: 1.4;
  letter-spacing: -0.017em;
  color: var(--vitapel-black);
  margin-bottom: 1rem;
  animation: fadeInUp 0.5s ease-out;
}

h4, .h4 {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-weight: 600;
  font-size: 1.5rem;
  line-height: 1.5;
  letter-spacing: -0.014em;
  color: var(--vitapel-black);
  margin-bottom: 0.875rem;
}

h5, .h5 {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-weight: 600;
  font-size: 1.25rem;
  line-height: 1.5;
  letter-spacing: -0.011em;
  color: var(--vitapel-black);
  margin-bottom: 0.75rem;
}

h6, .h6 {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-weight: 600;
  font-size: 1.125rem;
  line-height: 1.5;
  letter-spacing: -0.009em;
  color: var(--vitapel-black);
  margin-bottom: 0.5rem;
}

/* Parágrafos e textos */
p {
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 1.25rem;
  color: #2c3e50;
}

/* Textos pequenos mais legíveis */
small, .small {
  font-size: 14px;
  line-height: 1.5;
}

/* Labels e textos de formulário */
label, .control-label {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 15px;
  color: var(--vitapel-black);
  margin-bottom: 0.5rem;
  letter-spacing: -0.006em;
}

/* ============================================================
   2. ANIMAÇÕES E TRANSIÇÕES SUAVES
   ============================================================ */

/* Keyframes para animações */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

/* Animações para elementos do container */
.main-content {
  animation: fadeIn 0.5s ease-out;
}

.container, .container-fluid {
  animation: fadeInUp 0.6s ease-out;
}

/* ============================================================
   3. BOTÕES APRIMORADOS COM MICROINTERAÇÕES
   ============================================================ */

.btn {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 15px;
  padding: 12px 28px;
  border-radius: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  letter-spacing: 0.01em;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Efeito ripple ao clicar */
.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:active::before {
  width: 300px;
  height: 300px;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

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

/* Botões com gradientes animados */
.btn-primary {
  background: linear-gradient(135deg, var(--vitapel-petroleum), var(--vitapel-blue-green));
  border: none;
  color: white;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #004d5f, #6fb3b3);
}

.btn-success {
  background: linear-gradient(135deg, #10b981, #34d399);
  border: none;
  color: white;
}

.btn-warning {
  background: linear-gradient(135deg, var(--vitapel-pastel-orange), #f59e0b);
  border: none;
  color: white;
}

.btn-danger {
  background: linear-gradient(135deg, var(--vitapel-coral), #dc2626);
  border: none;
  color: white;
}

/* ============================================================
   4. CARDS E PANELS MODERNOS
   ============================================================ */

.panel, .card {
  border-radius: 16px;
  border: 1px solid rgba(134, 198, 198, 0.2);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  background: white;
  animation: scaleIn 0.5s ease-out;
}

.panel:hover, .card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 35px rgba(21, 122, 127, 0.15);
  border-color: rgba(134, 198, 198, 0.4);
}

.panel-heading, .card-header {
  background: linear-gradient(135deg, var(--vitapel-petroleum), var(--vitapel-blue-green));
  color: white;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 1.125rem;
  padding: 1.25rem 1.5rem;
  border: none;
}

.panel-body, .card-body {
  padding: 1.75rem;
  font-size: 15px;
  line-height: 1.7;
}

/* ============================================================
   5. FORMULÁRIOS APRIMORADOS
   ============================================================ */

.form-control {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  padding: 12px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background-color: #fafafa;
  color: var(--vitapel-black);
}

.form-control:focus {
  border-color: var(--vitapel-blue-green);
  box-shadow: 0 0 0 4px rgba(134, 198, 198, 0.1);
  background-color: white;
  outline: none;
  transform: translateY(-1px);
}

.form-control::placeholder {
  color: #9ca3af;
  font-weight: 400;
}

/* Input groups melhorados */
.input-group-addon {
  background: linear-gradient(135deg, var(--vitapel-turquoise-light), var(--vitapel-blue-green));
  color: white;
  border: none;
  font-weight: 600;
  border-radius: 10px 0 0 10px;
}

/* ============================================================
   6. TABELAS MODERNAS
   ============================================================ */

.table {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  border-collapse: separate;
  border-spacing: 0 8px;
}

.table thead th {
  background: linear-gradient(135deg, var(--vitapel-petroleum), var(--vitapel-blue-green));
  color: white;
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 16px;
  border: none;
  white-space: nowrap;
}

.table tbody tr {
  background: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: all 0.3s ease;
  border-radius: 8px;
}

.table tbody tr:hover {
  transform: scale(1.01);
  box-shadow: 0 4px 16px rgba(21, 122, 127, 0.12);
  background: rgba(134, 198, 198, 0.05);
}

.table tbody td {
  padding: 16px;
  vertical-align: middle;
  border: none;
  color: #374151;
}

/* ============================================================
   7. ALERTS E MENSAGENS APRIMORADAS
   ============================================================ */

.alert {
  border-radius: 12px;
  border: none;
  padding: 16px 20px;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 500;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  animation: slideInDown 0.5s ease-out;
  position: relative;
  overflow: hidden;
}

.alert::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
}

.alert-success {
  background: linear-gradient(135deg, #d1fae5, #a7f3d0);
  color: #065f46;
}

.alert-success::before {
  background: #10b981;
}

.alert-info {
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
  color: #1e40af;
}

.alert-info::before {
  background: #3b82f6;
}

.alert-warning {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  color: #92400e;
}

.alert-warning::before {
  background: #f59e0b;
}

.alert-danger {
  background: linear-gradient(135deg, #fee2e2, #fecaca);
  color: #991b1b;
}

.alert-danger::before {
  background: #ef4444;
}

/* ============================================================
   8. BADGES E LABELS MODERNOS
   ============================================================ */

.badge, .label {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 13px;
  padding: 5px 12px;
  border-radius: 20px;
  letter-spacing: 0.02em;
  transition: all 0.3s ease;
}

.badge:hover, .label:hover {
  transform: scale(1.05);
}

.label-primary, .badge-primary {
  background: linear-gradient(135deg, var(--vitapel-petroleum), var(--vitapel-blue-green));
}

.label-success, .badge-success {
  background: linear-gradient(135deg, #10b981, #34d399);
}

.label-warning, .badge-warning {
  background: linear-gradient(135deg, var(--vitapel-pastel-orange), #f59e0b);
}

.label-danger, .badge-danger {
  background: linear-gradient(135deg, var(--vitapel-coral), #dc2626);
}

/* ============================================================
   9. LOADING E SKELETON SCREENS
   ============================================================ */

.loading {
  position: relative;
  pointer-events: none;
  opacity: 0.6;
}

.loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  animation: shimmer 2s infinite;
}

/* ============================================================
   10. TOOLTIPS E POPOVERS MODERNOS
   ============================================================ */

.tooltip {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
}

.tooltip-inner {
  background-color: var(--vitapel-petroleum);
  border-radius: 8px;
  padding: 8px 14px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* ============================================================
   11. BREADCRUMBS MODERNOS
   ============================================================ */

.breadcrumb {
  background: linear-gradient(135deg, rgba(134, 198, 198, 0.1), rgba(229, 139, 104, 0.05));
  border-radius: 12px;
  padding: 12px 20px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.breadcrumb > li + li::before {
  content: "›";
  padding: 0 8px;
  color: var(--vitapel-blue-green);
  font-size: 18px;
}

/* ============================================================
   12. PAGINAÇÃO MODERNA
   ============================================================ */

.pagination > li > a,
.pagination > li > span {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  border-radius: 10px;
  margin: 0 4px;
  padding: 10px 16px;
  border: 2px solid rgba(134, 198, 198, 0.3);
  color: var(--vitapel-petroleum);
  transition: all 0.3s ease;
}

.pagination > li > a:hover {
  background: var(--vitapel-blue-green);
  border-color: var(--vitapel-blue-green);
  color: white;
  transform: translateY(-2px);
}

.pagination > .active > a,
.pagination > .active > span {
  background: linear-gradient(135deg, var(--vitapel-petroleum), var(--vitapel-blue-green));
  border-color: var(--vitapel-petroleum);
  color: white;
}

/* ============================================================
   13. MODAIS APRIMORADOS
   ============================================================ */

.modal-content {
  border-radius: 20px;
  border: none;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  animation: scaleIn 0.3s ease-out;
}

.modal-header {
  background: linear-gradient(135deg, var(--vitapel-petroleum), var(--vitapel-blue-green));
  color: white;
  border-radius: 20px 20px 0 0;
  padding: 1.5rem 2rem;
  border: none;
}

.modal-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
}

.modal-body {
  padding: 2rem;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  line-height: 1.7;
}

.modal-footer {
  border-top: 1px solid rgba(134, 198, 198, 0.2);
  padding: 1.5rem 2rem;
  border-radius: 0 0 20px 20px;
}

/* ============================================================
   14. LINKS APRIMORADOS
   ============================================================ */

a {
  color: var(--vitapel-blue-green);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
}

.a:hover {
  color: var(--vitapel-petroleum);
}

a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -2px;
  left: 0;
  background: var(--vitapel-petroleum);
  transition: width 0.3s ease;
}

a:hover::after {
  width: 100%;
}

/* Remover underline de links em botões */
.btn a::after {
  display: none !important;
}

/* ============================================================
   15. SCROLLBAR CUSTOMIZADA
   ============================================================ */

::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, var(--vitapel-blue-green), var(--vitapel-petroleum));
  border-radius: 10px;
  border: 2px solid #f1f1f1;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, var(--vitapel-petroleum), var(--vitapel-blue-green));
}

/* ============================================================
   16. RESPONSIVE ENHANCEMENTS
   ============================================================ */

@media (max-width: 768px) {
  body {
    font-size: 15px;
  }
  
  h1, .h1 { font-size: 2rem; }
  h2, .h2 { font-size: 1.75rem; }
  h3, .h3 { font-size: 1.5rem; }
  h4, .h4 { font-size: 1.25rem; }
  h5, .h5 { font-size: 1.125rem; }
  h6, .h6 { font-size: 1rem; }
  
  .btn {
    font-size: 14px;
    padding: 10px 20px;
  }
  
  .panel-body, .card-body {
    padding: 1.25rem;
  }
}

/* ============================================================
   17. UTILITÁRIOS DE ANIMAÇÃO
   ============================================================ */

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

.fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

.slide-in-left {
  animation: slideInLeft 0.6s ease-out;
}

.slide-in-right {
  animation: slideInRight 0.6s ease-out;
}

.scale-in {
  animation: scaleIn 0.5s ease-out;
}

.pulse {
  animation: pulse 2s ease-in-out infinite;
}

/* Classe para desabilitar animações (acessibilidade) */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
