/* Importar fonte moderna */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* Estilos gerais da página index.html */

/* Reset e configurações base */
* {
  font-family: 'Inter', sans-serif;
}

/* Gradiente principal - ALTERADO PARA AZUL */
.bg-gradient {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

/* Sombra para cards */
.card-shadow {
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

/* Animação de flutuação */
.icon-float {
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { 
    transform: translateY(0px);
  }
  50% { 
    transform: translateY(-10px);
  }
}

/* Transições para inputs */
.input-focus {
  transition: all 0.3s ease;
}

.input-focus:focus {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(37, 99, 235, 0.2);
}

/* Transições para botões */
.btn-hover {
  transition: all 0.3s ease;
}

.btn-hover:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 35px rgba(37, 99, 235, 0.4);
}

/* Estilos do corpo da página - FUNDO MELHORADO */
body {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 25%, #dbeafe 75%, #bfdbfe 100%);
  background-attachment: fixed;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

/* Elementos decorativos de fundo */
body::before {
  content: '';
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: 
    radial-gradient(circle at 20% 80%, rgba(37, 99, 235, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(147, 197, 253, 0.05) 0%, transparent 50%);
  z-index: -2;
  animation: floatBackground 20s ease-in-out infinite;
}

body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="20" height="20" patternUnits="userSpaceOnUse"><path d="M 20 0 L 0 0 0 20" fill="none" stroke="rgba(37, 99, 235, 0.03)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
  z-index: -1;
  opacity: 0.3;
}

@keyframes floatBackground {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg);
  }
  33% {
    transform: translate(30px, -30px) rotate(1deg);
  }
  66% {
    transform: translate(-20px, 20px) rotate(-1deg);
  }
}

/* Header moderno - ATUALIZADO PARA NOVO FUNDO */
.header-principal {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(37, 99, 235, 0.1);
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.08);
  padding: 20px 0;
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-info {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.header-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: float 3s ease-in-out infinite;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.header-title {
  color: #1f2937;
  margin: 0;
  font-size: 2rem;
  font-weight: 700;
}

.header-subtitle {
  color: #6b7280;
  margin: 0;
  font-size: 0.875rem;
}

/* Main content container */
.main-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

/* Estilo do formulário principal */
.form-container {
  width: 100%;
  max-width: 480px;
}

/* Alert de warning modernizado */
.warning-box {
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  border: 2px solid #f87171;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: 0 8px 25px rgba(248, 113, 113, 0.15);
  display: flex;
  align-items: center;
  gap: 16px;
}

.warning-icon {
  color: #dc2626;
  font-size: 1.5rem;
}

.warning-content h4 {
  color: #7f1d1d;
  font-weight: 700;
  font-size: 1.125rem;
  margin: 0 0 4px 0;
}

.warning-content p {
  color: #991b1b;
  margin: 0;
  font-size: 0.875rem;
}

/* Card principal do formulário - MELHORADO */
form {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  padding: 40px;
  border-radius: 20px;
  box-shadow: 
    0 25px 80px rgba(37, 99, 235, 0.08),
    0 0 0 1px rgba(255, 255, 255, 0.8);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(37, 99, 235, 0.1);
}

/* Barra decorativa no topo - ALTERADO PARA AZUL */
form::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

/* Header do card */
.form-header {
  text-align: center;
  margin-bottom: 40px;
}

.form-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  animation: float 3s ease-in-out infinite;
}

.form-title {
  color: #1f2937;
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 8px 0;
}

.form-subtitle {
  color: #6b7280;
  font-size: 1rem;
  margin: 0;
}

/* Grupos de campos */
.field-group {
  margin-bottom: 24px;
}

.field-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 8px;
}

.field-icon {
  color: #2563eb;
  margin-right: 8px;
}

/* Estilo dos inputs, selects e botões */
input, select, button {
  width: 100%;
  padding: 16px;
  font-size: 1rem;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  box-sizing: border-box;
  transition: all 0.3s ease;
  background: white;
}

input:focus, select:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
  outline: none;
  transform: translateY(-2px);
}

input::placeholder {
  color: #9ca3af;
}

/* Estilo da classe btn (botões) - ALTERADO PARA AZUL */
.btn {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: white;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* Efeito hover para botões */
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 35px rgba(37, 99, 235, 0.4);
  opacity: 0.9;
}

.btn:active {
  transform: translateY(0);
}

/* Estilo da área de mensagens */
#mensagem {
  margin-top: 20px;
  font-weight: 600;
  text-align: center;
  border-radius: 8px;
  padding: 12px 16px;
  transition: all 0.3s ease;
}

/* Mensagens de sucesso */
.success-message {
  background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
  border: 2px solid #34d399;
  color: #065f46;
}

/* Mensagens de erro */
.error-message {
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  border: 2px solid #f87171;
  color: #b91c1c;
}

/* Modais modernos */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.modal-content {
  background: white;
  margin: 5% auto;
  padding: 0;
  border-radius: 16px;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.2);
  width: 90%;
  max-width: 500px;
  overflow: hidden;
}

.modal-header {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: white;
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  margin: 0;
  color: white;
  font-size: 1.25rem;
  font-weight: 700;
}

.modal-body {
  padding: 24px;
}

.close {
  color: white;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.close:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Container para cartões de solicitações no modal */
.container-cartoes {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 15px !important;
  justify-content: center !important;
  margin-top: 20px !important;
  width: 100% !important;
  max-width: 1200px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.cartao-solicitacao {
  flex: 1 1 0 !important;
  min-width: 280px !important;
  max-width: 350px !important;
  border: 2px solid #e5e7eb !important;
  border-radius: 12px !important;
  padding: 20px !important;
  background-color: #ffffff !important;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05) !important;
  transition: transform 0.2s, box-shadow 0.2s !important;
}

.cartao-solicitacao:hover {
  transform: translateY(-5px) !important;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1) !important;
}

/* Botões dos cartões - ALTERADO PARA AZUL */
.btn-refazer, .btn-cancelar {
  transition: all 0.2s ease !important;
  font-weight: 600 !important;
  border-radius: 8px !important;
  margin-right: 8px !important;
  padding: 8px 16px !important;
  border: none !important;
  cursor: pointer !important;
}

.btn-refazer {
  background-color: #2563eb !important;
  color: white !important;
}

.btn-refazer:hover {
  background-color: #1d4ed8 !important;
  transform: translateY(-2px) !important;
}

.btn-cancelar {
  background-color: #dc2626 !important;
  color: white !important;
}

.btn-cancelar:hover {
  background-color: #b91c1c !important;
  transform: translateY(-2px) !important;
}

/* Footer moderno - ATUALIZADO */
footer {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-top: 1px solid rgba(37, 99, 235, 0.1);
  margin-top: auto;
  padding: 24px 0;
  box-shadow: 0 -4px 20px rgba(37, 99, 235, 0.05);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  text-align: center;
}

.footer-text {
  color: #374151;
  font-size: 0.875rem;
  margin: 0 0 4px 0;
  opacity: 0.9;
}

.footer-subtext {
  color: #6b7280;
  font-size: 0.75rem;
  margin: 0;
  opacity: 0.75;
}

/* Responsividade */
@media (max-width: 768px) {
  .header-content {
    padding: 0 16px;
    height: 64px;
  }
  
  .header-title {
    font-size: 1.5rem;
  }
  
  .main-content {
    padding: 20px 16px;
  }
  
  form {
    padding: 24px;
  }
  
  .form-title {
    font-size: 1.5rem;
  }
  
  .container-cartoes {
    gap: 10px !important;
    padding: 0 5px !important;
  }
  
  .cartao-solicitacao {
    min-width: 260px !important;
    max-width: none !important;
    padding: 15px !important;
    font-size: 0.9rem !important;
  }

  .modal-content {
    width: 95%;
    margin: 10% auto;
    max-width: none;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .container-cartoes {
    gap: 12px !important;
  }
  
  .cartao-solicitacao {
    min-width: 270px !important;
    max-width: 320px !important;
  }
}

@media (min-width: 1025px) {
  .cartao-solicitacao {
    min-width: 280px !important;
    max-width: 350px !important;
  }
}

/* ADICIONAR ao estilos-index.css - Estilos para estados de carregamento dos botões */

/* Estado de carregamento para botão principal */
.btn:disabled {
  opacity: 0.7 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
  transform: none !important;
  box-shadow: none !important;
}

/* Animação de spinner */
.fa-spinner {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Estados específicos para botões de ação nos cartões */
.btn-refazer:disabled,
.btn-cancelar:disabled {
  opacity: 0.6 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
  transform: none !important;
}

/* Efeito visual de carregamento */
.btn-refazer:disabled {
  background-color: #64748b !important;
  color: white !important;
}

.btn-cancelar:disabled {
  background-color: #64748b !important;
  color: white !important;
}

/* Melhoria na transição dos botões */
.btn-refazer,
.btn-cancelar,
.btn {
  transition: all 0.2s ease !important;
  position: relative;
  overflow: hidden;
}

/* Indicador visual adicional de processamento */
.btn:disabled::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  animation: shimmer 1.5s ease-in-out infinite;
}

@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* Estado de hover desabilitado quando processando */
.btn:disabled:hover {
  transform: none !important;
  box-shadow: none !important;
}

/* Melhorar visibilidade do texto durante carregamento */
.btn:disabled .fas {
  margin-right: 6px;
}

/* Estilo especial para central offline */
.btn.central-offline {
  background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%) !important;
  color: #d1d5db !important;
  cursor: not-allowed !important;
  opacity: 0.5 !important;
}

.btn.central-offline:hover {
  transform: none !important;
  box-shadow: none !important;
}

/* Feedback visual mais claro para mensagens */
.success-message {
  background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
  border: 2px solid #34d399;
  color: #065f46;
  animation: slideIn 0.3s ease-out;
}

.error-message {
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  border: 2px solid #f87171;
  color: #b91c1c;
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Prevenir seleção de texto em botões desabilitados */
.btn:disabled {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

/* Estilo para botões em estado de carregamento nos cartões */
.cartao-solicitacao .btn-refazer:disabled,
.cartao-solicitacao .btn-cancelar:disabled {
  min-width: 80px; /* Manter largura consistente durante carregamento */
  white-space: nowrap;
}

/* Indicador visual de que o sistema está processando */
.processing-indicator {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 20px 30px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  z-index: 10000;
  display: none;
}

.processing-indicator.show {
  display: block;
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.9); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}