/* ==========================================================================
   CSS GLOBAL - CANAL DE ÉTICA COMASA (TEMA ESCURO PREMIUM GLASSMORPHIC)
   ========================================================================== */

:root {
  --bg-primary: #0b0f19;
  --bg-secondary: rgba(17, 24, 39, 0.7);
  --bg-tertiary: rgba(31, 41, 55, 0.5);
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-focus: #3b82f6;
  --border-success: #10b981;
  
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --text-highlight: #3b82f6;
  --text-success: #34d399;
  --text-warning: #fbbf24;
  --text-danger: #f87171;
  
  --accent-blue: #3b82f6;
  --accent-emerald: #10b981;
  --accent-gradient: linear-gradient(135deg, #3b82f6 0%, #10b981 100%);
  --button-hover-gradient: linear-gradient(135deg, #2563eb 0%, #059669 100%);
  
  --font-title: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  --shadow-main: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
  --radius-lg: 16px;
  --radius-md: 8px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.hidden {
  display: none !important;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Efeito de Luzes Flutuantes ao Fundo */
.background-glows {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.15;
}

.glow-1 {
  top: -10%;
  left: 10%;
  width: 400px;
  height: 400px;
  background: var(--accent-blue);
}

.glow-2 {
  bottom: 10%;
  right: 10%;
  width: 500px;
  height: 500px;
  background: var(--accent-emerald);
}

/* ==========================================================================
   LAYOUT
   ========================================================================== */

/* Barra de Navegação Superior (Canto Superior Direito) */
.top-nav-bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-bottom: 10px;
  width: 100%;
}

.top-admin-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
  padding: 10px 20px;
  border-radius: 30px;
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: none;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
  transition: all 0.25s ease;
}

.top-admin-btn:hover {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.45);
}

.container {
  max-width: 900px;
  margin: 20px auto 40px;
  padding: 0 20px;
}


.header {
  text-align: center;
  margin-bottom: 40px;
}

.logo-area {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 15px;
}

.logo-icon {
  background: var(--accent-gradient);
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.4);
}

.logo-area h1 {
  font-family: var(--font-title);
  font-size: 32px;
  font-weight: 800;
  letter-spacing: 1px;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.header h2 {
  font-family: var(--font-title);
  font-size: 26px;
  font-weight: 600;
  margin-bottom: 10px;
}

.tagline {
  color: var(--text-muted);
  font-size: 15px;
  max-width: 700px;
  margin: 0 auto;
}

/* ==========================================================================
   TABS DE NAVEGAÇÃO
   ========================================================================== */

.tabs-container {
  background: var(--bg-secondary);
  border: 1px solid var(--border-glass);
  backdrop-filter: blur(12px);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-main);
  padding: 30px;
}

.tabs-header {
  display: flex;
  border-bottom: 1px solid var(--border-glass);
  margin-bottom: 30px;
  gap: 10px;
}

.tab-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-title);
  font-size: 16px;
  font-weight: 600;
  padding: 15px 25px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 3px solid transparent;
  transition: all 0.3s ease;
}

.tab-btn:hover {
  color: var(--text-main);
}

.tab-btn.active {
  color: var(--accent-blue);
  border-bottom-color: var(--accent-blue);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* ==========================================================================
   FORMULÁRIOS & CAMPOS
   ========================================================================== */

.form-section {
  border: none;
  margin-bottom: 30px;
}

.form-section legend {
  font-family: var(--font-title);
  font-size: 18px;
  font-weight: 600;
  color: var(--accent-blue);
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-desc {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.form-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-grid-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

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

.form-group {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 14px;
  font-weight: 600;
}

.required {
  color: var(--text-danger);
}

.field-help {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Custom inputs e dropdowns */
input[type="text"],
input[type="password"],
input[type="tel"],
input[type="email"],
select,
textarea {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
  transition: all 0.3s ease;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="tel"]:focus,
input[type="email"]:focus,
select:focus,
textarea:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.2);
  background: rgba(17, 24, 39, 0.9);
}

/* Prevenção de fundo branco no auto-preenchimento (autofill) de navegadores */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus,
select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text-main) !important;
  -webkit-box-shadow: 0 0 0px 1000px #1f2937 inset !important;
  box-shadow: 0 0 0px 1000px #1f2937 inset !important;
  transition: background-color 5000s ease-in-out 0s !important;
}

select option {
  background-color: #111827;
  color: var(--text-main);
}

textarea {
  resize: vertical;
}

/* ==========================================================================
   UPLOAD DE ARQUIVOS (DRAG & DROP)
   ========================================================================== */

.upload-dropzone {
  border: 2px dashed rgba(59, 130, 246, 0.4);
  background: rgba(59, 130, 246, 0.03);
  border-radius: var(--radius-md);
  padding: 30px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.upload-dropzone:hover,
.upload-dropzone.dragover {
  border-color: var(--border-focus);
  background: rgba(59, 130, 246, 0.08);
}

.upload-icon {
  font-size: 32px;
  color: var(--accent-blue);
}

.upload-dropzone p {
  font-size: 14px;
  color: var(--text-muted);
}

.upload-dropzone p span {
  color: var(--accent-blue);
  font-weight: 600;
  text-decoration: underline;
}

/* Pré-visualização de arquivos selecionados */
.file-preview-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 15px;
}

@media (max-width: 600px) {
  .file-preview-list {
    grid-template-columns: 1fr;
  }
}

.file-preview-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 10px 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  animation: fadeIn 0.3s ease-out;
}

.file-info-group {
  display: flex;
  align-items: center;
  gap: 12px;
  overflow: hidden;
}

.file-icon {
  font-size: 20px;
}

.file-type-icon-img { color: #60a5fa; }
.file-type-icon-vid { color: #f472b6; }
.file-type-icon-pdf { color: #f87171; }

.file-details {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.file-name {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-size {
  font-size: 11px;
  color: var(--text-muted);
}

.remove-file-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 16px;
  padding: 4px;
  transition: color 0.2s ease;
}

.remove-file-btn:hover {
  color: var(--text-danger);
}

/* ==========================================================================
   BOTÕES E COMPONENTES DE ENTRADA
   ========================================================================== */

.submit-btn {
  background: var(--accent-gradient);
  border: none;
  color: white;
  font-family: var(--font-title);
  font-size: 16px;
  font-weight: 700;
  padding: 15px 30px;
  border-radius: var(--radius-md);
  cursor: pointer;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
  transition: all 0.3s ease;
}

.submit-btn:hover {
  background: var(--button-hover-gradient);
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4);
  transform: translateY(-2px);
}

.submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.secondary-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  font-family: var(--font-title);
  font-weight: 600;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.3s ease;
}

.secondary-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.spinner {
  font-size: 18px;
}

/* ==========================================================================
   MODAL DE SUCESSO (PROTOCOLO GERADO)
   ========================================================================== */

.success-modal-card {
  max-width: 650px;
  text-align: center;
  padding: 40px 30px;
  position: relative;
}

.success-modal-card .close-modal-btn {
  position: absolute;
  top: 20px;
  right: 25px;
}

.success-icon {
  font-size: 64px;
  color: var(--accent-emerald);
  margin-bottom: 20px;
  filter: drop-shadow(0 0 15px rgba(16, 185, 129, 0.5));
}

.success-modal-card h3 {
  font-family: var(--font-title);
  font-size: 26px;
  margin-bottom: 15px;
}

.success-modal-card p {
  color: var(--text-muted);
  font-size: 15px;
  max-width: 550px;
  margin: 0 auto 30px;
}

.protocol-box {
  background: rgba(16, 185, 129, 0.06);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--radius-lg);
  padding: 22px;
  max-width: 480px;
  margin: 0 auto 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.protocol-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--accent-emerald);
}

.protocol-code {
  font-family: var(--font-title);
  font-size: 30px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--text-main);
}

.copy-btn {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.copy-btn:hover {
  background: var(--accent-emerald);
  color: white;
  border-color: var(--accent-emerald);
}

.warning-alert {
  background: rgba(245, 158, 11, 0.06);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: var(--radius-md);
  padding: 15px;
  max-width: 550px;
  margin: 0 auto 25px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  text-align: left;
}

.warning-alert i {
  color: var(--text-warning);
  font-size: 20px;
  margin-top: 2px;
}

.warning-alert p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-muted);
}

.warning-alert strong {
  color: var(--text-main);
}

.success-modal-actions {
  display: flex;
  justify-content: center;
  margin-top: 10px;
}

/* Alerta de Bloqueio por Conclusão */
.completed-lock-alert {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 20px;
  animation: fadeIn 0.3s ease;
}

/* ==========================================================================
   TELA DE ACOMPANHAMENTO (RASTREAR)
   ========================================================================== */

.track-form-card {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 30px;
}

.track-form-card h3 {
  font-family: var(--font-title);
  font-size: 20px;
  margin-bottom: 10px;
}

.track-form-card p {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 25px;
}

.search-box {
  display: flex;
  gap: 10px;
  max-width: 500px;
  margin: 0 auto;
}

.search-box input {
  flex: 1;
  font-size: 16px;
}

.search-box button {
  background: var(--accent-blue);
  border: none;
  color: white;
  padding: 0 25px;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background 0.2s ease;
}

.search-box button:hover {
  background: #2563eb;
}

.error-banner {
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.25);
  color: var(--text-danger);
  border-radius: var(--radius-md);
  padding: 12px;
  font-size: 14px;
  margin-top: 15px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  animation: fadeIn 0.3s ease;
}

/* Card de resultado de Rastreamento */
.track-result-card {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 25px;
  margin-top: 30px;
  animation: fadeIn 0.4s ease;
}

.result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-glass);
  padding-bottom: 15px;
  margin-bottom: 25px;
  flex-wrap: wrap;
  gap: 10px;
}

.result-header h4 {
  font-family: var(--font-title);
  font-size: 18px;
}

.result-header span {
  color: var(--accent-blue);
}

.date-badge {
  font-size: 12px;
  color: var(--text-muted);
}

/* Linha do tempo de Status */
.status-timeline {
  display: flex;
  justify-content: space-between;
  margin-bottom: 30px;
  position: relative;
}

.status-timeline::before {
  content: '';
  position: absolute;
  top: 18px;
  left: 10%;
  right: 10%;
  height: 4px;
  background: var(--border-glass);
  z-index: 1;
}

.timeline-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 2;
  flex: 1;
}

.step-bullet {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 3px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--text-muted);
  transition: all 0.3s ease;
}

.step-label {
  font-size: 13px;
  font-weight: 600;
  margin-top: 8px;
  color: var(--text-muted);
  transition: all 0.3s ease;
}

/* Estados da Linha do Tempo */
.timeline-step.active .step-bullet {
  border-color: var(--accent-blue);
  color: var(--accent-blue);
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.4);
}

.timeline-step.active .step-label {
  color: var(--text-main);
  font-weight: 700;
}

.timeline-step.completed .step-bullet {
  background: var(--accent-emerald);
  border-color: var(--accent-emerald);
  color: white;
}

.timeline-step.completed .step-label {
  color: var(--text-success);
}

/* Informações do resultado */
.result-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.info-block {
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 20px;
}

.info-block h5 {
  font-family: var(--font-title);
  font-size: 15px;
  color: var(--accent-blue);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.info-block p {
  font-size: 14px;
  margin-bottom: 8px;
}

.res-attachments-list {
  list-style: none;
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.res-attachments-list li {
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.02);
  padding: 6px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-glass);
  width: fit-content;
}

.file-size-tag {
  color: var(--text-muted);
  font-size: 11px;
}

.feedback-block {
  border-left: 4px solid var(--accent-emerald);
  background: rgba(16, 185, 129, 0.02);
}

.feedback-block h5 {
  color: var(--accent-emerald);
}

.feedback-block p {
  color: var(--text-main);
  line-height: 1.6;
  font-size: 14px;
  white-space: pre-line;
}

/* ==========================================================================
   PAINEL DO ADMINISTRADOR (COMPLIANCE)
   ========================================================================= */

.admin-body {
  background-color: #070a13;
}

.admin-container {
  max-width: 1280px;
}

.admin-header {
  margin-bottom: 30px;
}

.header-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.badge-admin {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid var(--accent-blue);
  color: var(--accent-blue);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.back-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s ease;
}

.back-link:hover {
  color: var(--text-main);
}

/* Métricas do Admin */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}

@media (max-width: 992px) {
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 576px) {
  .metrics-grid {
    grid-template-columns: 1fr;
  }
}

.metric-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-glass);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  box-shadow: var(--shadow-main);
}

.metric-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.card-total .metric-icon { background: rgba(59, 130, 246, 0.1); color: var(--accent-blue); }
.card-pending .metric-icon { background: rgba(245, 158, 11, 0.1); color: var(--text-warning); }
.card-investigating .metric-icon { background: rgba(96, 165, 250, 0.1); color: #60a5fa; }
.card-completed .metric-icon { background: rgba(16, 185, 129, 0.1); color: var(--accent-emerald); }

.metric-info {
  display: flex;
  flex-direction: column;
}

.metric-value {
  font-family: var(--font-title);
  font-size: 26px;
  font-weight: 800;
  line-height: 1.1;
}

.metric-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 4px;
}

/* Controles de busca no Admin */
.admin-controls-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-main);
}

.controls-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  align-items: center;
}

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

.search-group {
  position: relative;
  width: 100%;
}

.search-icon-input {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.search-group input {
  width: 100%;
  padding-left: 45px;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
}

@media (max-width: 768px) {
  .filter-group {
    justify-content: flex-start;
  }
}

.filter-group label {
  font-size: 13px;
  white-space: nowrap;
  color: var(--text-muted);
}

.filter-group select {
  width: 100%;
  max-width: 200px;
}

/* Tabela de Denúncias */
.table-container-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 25px;
  box-shadow: var(--shadow-main);
}

.table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 10px;
}

.table-header h3 {
  font-family: var(--font-title);
  font-size: 18px;
}

.refresh-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.refresh-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--accent-blue);
  border-color: var(--accent-blue);
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}

.admin-table th {
  background: var(--bg-tertiary);
  color: var(--text-muted);
  font-weight: 600;
  padding: 14px 16px;
  border-bottom: 2px solid var(--border-glass);
}

.admin-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-glass);
  vertical-align: middle;
}

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

.admin-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.015);
}

.td-protocol {
  color: var(--accent-blue);
  font-family: var(--font-title);
}

/* Badges da Tabela */
.anon-tag {
  background: rgba(156, 163, 175, 0.1);
  border: 1px solid rgba(156, 163, 175, 0.2);
  color: var(--text-muted);
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
}

.ident-tag {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
}

.has-files {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  color: var(--text-success);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}

.no-files {
  color: var(--text-muted);
}

.status-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 12px;
  text-transform: uppercase;
  display: inline-block;
}

.status-pending { background: rgba(245, 158, 11, 0.15); color: var(--text-warning); border: 1px solid var(--text-warning); }
.status-investigating { background: rgba(59, 130, 246, 0.15); color: #60a5fa; border: 1px solid #60a5fa; }
.status-completed { background: rgba(16, 185, 129, 0.15); color: var(--text-success); border: 1px solid var(--text-success); }

.action-btn-view {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  padding: 6px 12px;
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.action-btn-view:hover {
  background: var(--accent-blue);
  color: white;
  border-color: var(--accent-blue);
}

.action-btn-delete {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #f87171;
  padding: 6px 12px;
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.action-btn-delete:hover {
  background: #ef4444;
  color: white;
  border-color: #ef4444;
}

.actions-cell-group {
  display: flex;
  align-items: center;
  gap: 8px;
}


.table-info-row td {
  padding: 30px;
}

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

.text-error {
  color: var(--text-danger);
}

/* ==========================================================================
   HISTÓRICO DO CHAT DE RESPOSTAS (COMPLIANCE)
   ========================================================================== */

.chat-history-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 300px;
  overflow-y: auto;
  padding-right: 4px;
}

.chat-bubble {
  background: rgba(59, 130, 246, 0.05);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  animation: fadeIn 0.3s ease;
}

.chat-bubble-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  flex-wrap: wrap;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  padding-bottom: 6px;
}

.chat-author {
  font-family: var(--font-title);
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-blue);
  display: flex;
  align-items: center;
  gap: 6px;
}

.chat-date {
  font-size: 11px;
  color: var(--text-muted);
}

.chat-bubble-body {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-main);
  white-space: pre-wrap;
}

/* ==========================================================================
   MODAL DE INSPEÇÃO DETALHADA DO ADMIN
   ========================================================================== */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.3s ease;
}

.modal-overlay.hidden {
  display: none;
}

.modal-card {
  background: #0f172a;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 1000px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 10px 40px rgba(0,0,0,0.6);
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-header {
  padding: 20px 25px;
  border-bottom: 1px solid var(--border-glass);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  font-family: var(--font-title);
  font-size: 18px;
}

.modal-protocol {
  font-family: var(--font-title);
  font-size: 14px;
  color: var(--accent-blue);
  font-weight: 600;
  display: block;
  margin-top: 2px;
}

.close-modal-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  cursor: pointer;
  transition: color 0.2s ease;
}

.close-modal-btn:hover {
  color: var(--text-main);
}

.modal-body {
  padding: 25px;
}

.modal-grid {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 25px;
}

@media (max-width: 900px) {
  .modal-grid {
    grid-template-columns: 1fr;
  }
}

.details-section {
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 20px;
}

.details-section h4 {
  font-family: var(--font-title);
  font-size: 14px;
  color: var(--accent-blue);
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  padding-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.details-content p {
  font-size: 13px;
  margin-bottom: 8px;
}

.details-content strong {
  color: var(--text-muted);
}

.anon-alert {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
}

.anon-alert i {
  font-size: 24px;
  color: var(--accent-blue);
}

.anon-alert strong {
  color: var(--text-main);
  font-size: 14px;
}

.anon-alert p {
  margin: 0;
  font-size: 12px;
}

.not-informed {
  color: var(--text-muted);
  font-style: italic;
}

.text-block-desc {
  font-size: 13.5px;
  line-height: 1.6;
  white-space: pre-wrap;
  background: rgba(0, 0, 0, 0.15);
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.02);
}

/* Galeria de Evidências */
.media-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 15px;
}

.media-card {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.media-preview {
  height: 120px;
  background: #000;
  position: relative;
  cursor: pointer;
  overflow: hidden;
}

.media-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.media-preview:hover img {
  transform: scale(1.05);
}

.media-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.2s ease;
  gap: 6px;
}

.media-preview:hover .media-overlay {
  opacity: 1;
}

.video-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.doc-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.01);
}

.doc-icon-box {
  font-size: 40px;
  color: var(--text-muted);
}

.media-info {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.media-name {
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
}

.download-link-btn {
  background: rgba(59, 130, 246, 0.1);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.2);
  text-decoration: none;
  font-size: 11px;
  padding: 5px 0;
  border-radius: 4px;
  text-align: center;
  font-weight: 600;
  display: block;
  transition: all 0.2s ease;
}

.download-link-btn:hover {
  background: var(--accent-blue);
  color: white;
}

.no-media-msg {
  color: var(--text-muted);
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
}

/* Painel de Atualização (Coluna da Direita) */
.action-panel {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 20px;
  position: sticky;
  top: 0;
}

.action-panel h4 {
  font-family: var(--font-title);
  font-size: 15px;
  color: var(--accent-blue);
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  padding-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.update-btn {
  margin-top: 15px;
  background: var(--accent-gradient);
}

.update-btn:hover {
  background: var(--button-hover-gradient);
}

/* ==========================================================================
   LIGHTBOX IMAGEM AMPLIADA
   ========================================================================== */

.lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.9);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  animation: fadeIn 0.2s ease;
  cursor: zoom-out;
}

.lightbox-overlay.hidden {
  display: none;
}

.lightbox-overlay img {
  max-width: 90%;
  max-height: 80vh;
  object-fit: contain;
  box-shadow: 0 0 30px rgba(0,0,0,0.8);
  border-radius: 4px;
}

.lightbox-close {
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 15px;
  font-weight: 500;
}

/* ==========================================================================
   RODAPÉ (FOOTER)
   ========================================================================== */

.footer {
  text-align: center;
  padding: 40px 0;
  color: var(--text-muted);
  font-size: 12px;
}

.footer a {
  color: var(--text-muted);
  text-decoration: none;
}

.footer a:hover {
  color: var(--accent-blue);
}

.admin-link {
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.03);
  padding: 4px 10px;
  border-radius: 12px;
  border: 1px solid var(--border-glass);
}

/* ==========================================================================
   KEYFRAMES / ANIMAÇÕES
   ========================================================================== */

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

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

/* ==========================================================================
   TELA DE LOGIN DO ADMIN & PERFIL DE USUÁRIO
   ========================================================================== */

.header-right-group {
  display: flex;
  align-items: center;
  gap: 15px;
}

.header-user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-name-badge {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: var(--accent-blue);
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 13px;
  padding: 6px 14px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.change-pass-btn {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: var(--accent-blue);
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 13px;
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.3s ease;
}

.change-pass-btn:hover {
  background: rgba(59, 130, 246, 0.25);
  border-color: var(--accent-blue);
  transform: translateY(-1px);
}

.logout-btn {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--text-danger);
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 13px;
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.3s ease;
}

.logout-btn:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: var(--text-danger);
  transform: translateY(-1px);
}

.admin-login-card {
  max-width: 480px;
  margin: 40px auto;
  background: var(--bg-secondary);
  border: 1px solid var(--border-glass);
  backdrop-filter: blur(16px);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-main);
  padding: 40px 35px;
  animation: slideUp 0.4s ease-out;
}

.login-card-header {
  text-align: center;
  margin-bottom: 30px;
}

.login-icon {
  width: 60px;
  height: 60px;
  background: var(--accent-gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: #fff;
  margin: 0 auto 16px auto;
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.4);
}

.login-card-header h3 {
  font-family: var(--font-title);
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-main);
}

.login-card-header p {
  color: var(--text-muted);
  font-size: 14px;
}

.login-submit-btn {
  margin-top: 10px;
  width: 100%;
}

.login-error-banner {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--text-danger);
  font-size: 13.5px;
  padding: 12px 15px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.login-help-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
  font-size: 12.5px;
  color: var(--text-muted);
  text-align: center;
}

.login-footer-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 25px;
  padding-top: 18px;
  border-top: 1px solid var(--border-glass);
}

/* ==========================================================================
   NAVEGAÇÃO POR ABAS DO ADMIN & AUDITORIA DE ACESSOS
   ========================================================================== */

.admin-tabs-nav {
  display: flex;
  gap: 12px;
  margin-bottom: 30px;
  border-bottom: 1px solid var(--border-glass);
  padding-bottom: 15px;
  flex-wrap: wrap;
}

.admin-nav-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  font-family: var(--font-title);
  font-size: 14.5px;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 30px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
}

.admin-nav-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
}

.admin-nav-btn.active {
  background: var(--accent-blue);
  color: #fff;
  border-color: var(--accent-blue);
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.35);
}

.admin-users-grid {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 25px;
  align-items: start;
}

@media (max-width: 900px) {
  .admin-users-grid {
    grid-template-columns: 1fr;
  }
}

.user-badge-tag {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.25);
  color: var(--accent-blue);
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.log-date-badge {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: var(--text-success);
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.email-badge-tag {
  background: rgba(14, 165, 233, 0.1);
  border: 1px solid rgba(14, 165, 233, 0.25);
  color: #38bdf8;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.action-btn-danger {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #f87171;
  padding: 6px 12px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-fast);
}

.action-btn-danger:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  transform: translateY(-1px);
}
