/* Fonte personalizada */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* Reset básico e Configurações Globais */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
}

html {
  background-color: rgb(255, 255, 255);
  /* background-image: radial-gradient(1200px 500px at 100% 0%, #3b82f6 0%, #5a83f2 10%, #2563eb 40%, #1d4ed8 70%, #2258ebff 100%);*/
  background-attachment: fixed;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background: transparent;
  line-height: 1.6;
  color: #374151;
  min-height: 100vh;
  z-index: 0;
  overscroll-behavior: contain;
  overflow-x: hidden;
}

/* --- Layout Principal --- */
.header {
  background-image: linear-gradient(to right, #2854ce, #2c5ee7, #1d4ed8, #1d4ed8, #1e3a8a);
  box-shadow: #11182794;
  color: white;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  padding: 0 1rem;
}

.header-nav {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  z-index: 2;
  height: 95px;
}

.header-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #dbeafe;
  opacity: 0.9;
  /*box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);*/
  z-index: 1;
}

.container {
  max-width: 896px;
  margin: 0 auto;
  padding: 1.5rem;
  /*background-image:linear-gradient(to right, #3f69db, #2753cc, #3e6ef0, #2d57ca, #224ab8); */
  position: relative;
  border-radius: 0.75rem;
  z-index: 0;
  margin-top: -4.65rem;
  /* Efeito de sobreposição */
  box-shadow: 10px 38px 25px -5px rgba(0, 0, 0, 0.315), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.logo_hoftalon {
  display: block;
  margin: auto;
  z-index: 1;
  margin-bottom: 1.12rem;
}

.main-card {
  background-color: white;
  padding: 1.5rem;
  border-radius: 0.75rem;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.26), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  border: 1px solid #e5e7eb;
  transition: all 0.5s;
  z-index: 2;
}

.footer {
  max-width: 700px;
  /*896*/
  margin: 0 auto;
  padding: 2rem;
  margin-top: 3rem;
  text-align: center;
  color: #6b7280;
  font-size: 0.875rem;
}

.footer a {
  /*color: #2563eb;*/
  font-weight: 600;
  text-decoration: none;
}

/* --- Formulários --- */
.form-title {
  font-size: 1.875rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 2rem;

  text-align: center;
}

.boxdoresuldado {
  text-shadow: 0 1.8px 0 rgba(0, 0, 0, 0.21);
  align-items: center;
  justify-content: center;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  margin-bottom: 0.25rem;
  margin-left: 0.25rem;
}

.input-group {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #000000ff;
  width: 20px;
  height: 20px;
}

.input-field {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 3rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input-field:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.4);
}

textarea.input-field {
  padding: 0.75rem 1rem;
  height: 120px;
  resize: vertical;
}


/* --- Botões --- */
.btn {
  font-size: 1rem;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease-in-out;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.solicitarrevisao {
  font-weight: 600;
  text-align: center;
  padding-bottom: 40px;
}

.solicitarrevisoes {
  color: rgb(30, 30, 221);
}

.btn-primary {
  background-image: linear-gradient(to right, #2563eb, #1d4ed8);
  color: white;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.41);
  transform: translateY(0);
}

.btn-primary:hover {
  background-image: linear-gradient(to right, #1d4ed8, #1e3a8a);
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4);
  transform: translateY(-2px);
}

.btn-primary:disabled {
  background: #9ca3af;
  opacity: 0.7;
  cursor: not-allowed;
  transform: translateY(0);
  box-shadow: none;
}

.btn-secondary {
  background-image: linear-gradient(to right, #5785eaff, #1d4ed8);
  color: #ffffffff;
  margin-top: 52.75px;
}

.btn-secondary:hover {
  background-color: #d1d5db;
}

.text-center {
  text-align: center;
}

.pt-6 {
  padding-top: 1.5rem;
}

.mb-8 {
  margin-bottom: 2rem;
}

.text-sm {
  font-size: 0.875rem;
}

.py-2 {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.px-4 {
  padding-left: 1rem;
  padding-right: 1rem;
}

/* --- Alerta LGPD --- */
.alert-lgpd {
  background-color: #dae9fd;
  border-left: 5.1px solid #3b82f6;
  color: #1e3a8a;
  padding: 1.5rem;
  border-radius: 0.5rem;
  margin-bottom: 3.5rem;
  box-shadow: 0 5.8px 4.5px rgba(0, 0, 0, 0.18);
}

.alert-header {
  display: flex;
  align-items: center;
  font-size: 1.125rem;
  font-weight: 700;
}

.alert-header svg {
  width: 24px;
  height: 24px;
  margin-right: 0.75rem;
  stroke: #3b82f6;
}


.alert-lgpd p {
  font-size: 0.875rem;
  margin-top: 0.75rem;
}

.alert-lgpd ul {
  font-size: 0.875rem;
  margin-top: 0.75rem;
  list-style-position: inside;
  list-style-type: disc;
  padding-left: 0.5rem;
}

.alert-lgpd a {
  font-weight: 600;
  color: #2563eb;
  text-decoration: none;
}




/* --- Seção de Resultados (Desktop) --- */
.results-table-container {
  overflow-x: auto;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  border-radius: 0.5rem;
  border: 1px solid #e5e7eb;
}

.results-table {
  width: 100%;
  min-width: 800px;
  border-collapse: collapse;
}

.results-table th {
  background-color: #f9fafb;
  padding: 0.75rem 1.5rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  color: #4b5563;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.results-table td {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #e5e7eb;
  font-size: 0.875rem;
  color: #374151;
  white-space: nowrap;
}

.results-table tbody tr:hover {
  background-color: #f9fafb;
  transition: background-color 0.2s;
}

.results-table .col-posicao {
  font-size: 1.125rem;
  font-weight: 700;
  color: #1d4ed8;
  text-align: center;
}

.results-table .col-obs {
  white-space: normal;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
}




/* --- LISTA RESPONSIVA (Mobile) --- */
.responsive-results-list {
  display: none;
  border: 1px solid #dbeafe;
  overflow: hidden;
  border-radius: 3.5%;
  box-shadow: 0 4px 10px #dbeafe;
  box-shadow: 0 4px 5px rgba(0, 0, 0, 0.21);
}

.result-card {
  background-image: linear-gradient(to right, #ffffffff, #e8ebf5ff);
  padding: 1.25rem;
  border-bottom: 1px solid #ffffffff;
  border: 0.82px solid #dbeafe;
  border-radius: 3.5%;
  box-shadow: 0 3px #000000ff;
}

.result-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
  gap: 1rem;
}

.result-card-header .procedimento {
  font-size: 1.125rem;
  font-weight: 600;
  color: #1f2937;
}

.result-card-header .posicao-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.1;
  padding: 0.5rem 0.75rem;
  background-color: #ffffffff;
  border-radius: 0.5rem;
  border: 1px solid #dbeafe;
  box-shadow: 0 4px 5px rgba(0, 0, 0, 0.15);
}

.result-card-header .posicao {
  font-size: 1.75rem;
  font-weight: 700;
  color: #1d4ed8;
}

.result-card-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.result-data-item .label {
  font-weight: 500;
  color: #6b7280;
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.75rem;
}

.result-data-item .value {
  color: #111827;
  font-weight: 600;
  word-break: break-word;
}

.result-data-item.full-width {
  grid-column: 1 / -1;
}



/* --- MEDIA QUERY PARA RESPONSIVIDADE DA TABELA --- */
@media (max-width: 2900px) {
  .results-table-container {
    display: none;
  }

  .responsive-results-list {
    display: block;
  }
}



/* --- Mensagem "Sem Resultados" --- */
.no-results-message {
  text-align: center;
  padding: 2rem;
  background-color: #f9fafb;
  border-radius: 0.92rem;
  border: 1px solid #e5e7eb;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.36);
}

.no-results-message svg {
  width: 80px;
  height: 80px;
  color: #93c5fd;
  margin: 0 auto;
}

.no-results-message .title {
  margin-top: 1.25rem;
  font-size: 1.5rem;
  font-weight: 600;
  color: #1f2937;
}

.no-results-message .subtitle {
  margin-top: 0.75rem;
  color: #6b7280;
  max-width: 448px;
  margin-left: auto;
  margin-right: auto;
}



/* --- Modal (Dialog) --- */
.modal {
  padding: 0;
  border-radius: 0.75rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.69);
  width: 100%;
  max-width: 672px;
  border: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-height: 95vh;
  overflow-y: auto;
}

.modal::backdrop {
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
}

.modal-content {
  padding: 2.5rem;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.modal-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1f2937;
}

.modal-close-btn {
  background: none;
  border: none;
  color: #9ca3af;
  cursor: pointer;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 768px) {
  .form-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.modal-footer {
  display: flex;
  flex-direction: column-reverse;
  gap: 1rem;
  padding-top: 1rem;
}

@media (min-width: 768px) {
  .modal-footer {
    flex-direction: row;
    justify-content: flex-end;
  }
}



/* --- Toast (Notificação) --- */
.toast-message {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 50;
  padding: 1rem 1.5rem;
  border-radius: 0.5rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.21);
  color: white;
  max-width: 448px;
  transition: all 0.3s ease-in-out;
}

.toast-success {
  background-color: #10b981;
}

.toast-error {
  background-color: #ef4444;
}



/* --- Loader (Spinner) --- */
.loader {
  width: 24px;
  height: 24px;
  border: 4px solid #e5e7eb;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.loader-light {
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.global-loading {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  z-index: 10000;
}

.global-loading .loading-text {
  margin-top: 0.75rem;
  color: #1f2937;
  font-weight: 600;
}



/* --- Utilitários --- */
.hidden {
  display: none;
}

/* Responsividade geral */
@media (max-width: 796px) {
  .header-title {
    display: none;
  }

  .container {
    margin-top: -2.8rem;
    padding: 0.5rem;
  }

  .main-card {
    padding: 1rem;
  }

  .form-title {
    font-size: 1.5rem;
  }

  .modal {
    width: 92%;
  }

  .modal-content {
    padding: 1.5rem;
  }

  .modal-title {
    font-size: 1.25rem;
  }

  .btn {
    width: 100%;
  }

  .modal-footer {
    gap: 0.5rem;
  }

  .modal-footer .btn {
    width: 100%;
  }
}




.footer-p2 {
  color: rgb(0, 0, 0);
}

.footers {
  align-items: center;
}

.linkdepartamento {
  color: rgb(0, 0, 0);
}

.footer {
  position: relative;
  padding-top: 1rem;
}

.enabled {
  z-index: 9999;
}