/* style.css */
body {
  margin: 0;
  background-color: #f9fafb;
  font-family: Arial, sans-serif;
}

/* Menu de Navegação */
.main-nav {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.logo {
  font-size: 24px;
  font-weight: bold;
  color: white;
  letter-spacing: 2px;
}

.nav-menu {
  display: flex;
  gap: 10px;
}

.nav-btn {
  background: rgba(255,255,255,0.1);
  border: 2px solid transparent;
  color: white;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  transition: all 0.3s ease;
}

.nav-btn:hover {
  background: rgba(255,255,255,0.2);
  transform: translateY(-2px);
}

.nav-btn.active {
  background: white;
  color: #667eea;
  border-color: white;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.nav-btn svg {
  width: 20px;
  height: 20px;
}

/* Páginas de Conteúdo */
.page-content {
  display: none;
}

.page-content.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

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

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

h1 {
  margin-bottom: 20px;
  text-align: center;
  color: #333;
}

/* Estilos da Página de Presença (mantidos do original) */
.upload-section {
  margin-bottom: 20px;
  text-align: center;
}

.upload-section button,
.upload-section input[type="file"] {
  margin: 5px 8px;
}

#message {
  margin: 10px 0;
  color: red;
  text-align: center;
  font-weight: bold;
}

#topInfo {
  margin: 10px 0;
  font-weight: bold;
  text-align: center;
}

.filter-section {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 10px;
}

.filter-section label {
  font-weight: bold;
}

.filter-section select {
  padding: 4px;
  font-size: 0.9em;
}

.table-responsive {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  background-color: #fff;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

th, td {
  border-bottom: 1px solid #eee;
  padding: 8px;
  text-align: left;
}

th {
  background-color: #f0f0f0;
  font-weight: 600;
}

tbody tr:nth-child(even) {
  background-color: #fafafa;
}

.sortBtn {
  margin-left: 5px;
  cursor: pointer;
  background: none;
  border: none;
  font-size: 0.9em;
  opacity: 0.6;
}
.sortBtn:hover {
  opacity: 1;
}

.presente {
  background-color: #d2f8d2;
}

.falta {
  background-color: #ffcfcf;
}

tbody tr.importado:nth-child(odd) {
  background-color: #fffde7 !important;
}
tbody tr.importado:nth-child(even) {
  background-color: #fff9c4 !important;
}

#textoResumo {
  margin-top: 20px;
  padding: 10px;
  background: #f7f7f7;
  min-height: 80px;
  border: 1px solid #ccc;
  white-space: pre-wrap;
  font-size: 0.95em;
}

.servico-container {
  position: relative;
}
textarea.servico-area {
  width: 100%;
  min-height: 80px;
  font-size: 0.9em;
  resize: vertical;
  box-sizing: border-box;
}
.micBtn {
  position: absolute;
  right: 5px;
  bottom: 5px;
  font-size: 0.8em;
  background: transparent;
  border: none;
  cursor: pointer;
  opacity: 0.7;
}
.micBtn:hover {
  opacity: 1;
}

/* Modal genérico */
.modal {
  display: none;
  position: fixed;
  z-index: 999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.4);
}
.modal-content {
  background-color: #fff;
  margin: 5% auto;
  padding: 20px;
  width: 80%;
  max-width: 600px;
  position: relative;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}
.close {
  color: #aaa;
  float: right;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
}
.close:hover {
  color: #000;
}

#resetStatusBtn,
#deleteImportedBtn {
  background-color: #3182ce;
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
  margin-left: 10px;
}
#resetStatusBtn:hover,
#deleteImportedBtn:hover {
  background-color: #2b6cb0;
}

#popupDeleteImported .modal-content {
  max-width: 600px;
}
#deleteList {
  max-height: 300px;
  overflow-y: auto;
  margin-bottom: 10px;
}
.delete-list-item {
  display: flex;
  align-items: center;
  margin-bottom: 6px;
}
.delete-list-item input {
  margin-right: 8px;
}
#confirmDeleteBtn {
  background-color: #e53e3e;
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
}
#confirmDeleteBtn:hover {
  background-color: #c53030;
}

#popupBase .modal-content,
#popupUnresolved .modal-content {
  max-width: 600px;
}

#popupUnresolved pre {
  background: #f9f9f9;
  border: 1px solid #ccc;
  padding: 10px;
  min-height: 100px;
  white-space: pre-wrap;
  margin-bottom: 10px;
}

#copyUnresolvedBtn,
#pdfUnresolvedBtn {
  margin-right: 10px;
  background-color: #3182ce;
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
}
#copyUnresolvedBtn:hover,
#pdfUnresolvedBtn:hover {
  background-color: #2b6cb0;
}

/* ============================================ */
/* ESTILOS DO SISTEMA DE EPIs */
/* ============================================ */

/* Abas do Sistema de EPI */
.epi-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 0;
}

.tab-btn {
  background: none;
  border: none;
  padding: 12px 24px;
  cursor: pointer;
  font-size: 16px;
  color: #64748b;
  border-bottom: 3px solid transparent;
  transition: all 0.3s ease;
  font-weight: 500;
}

.tab-btn:hover {
  color: #667eea;
  background: rgba(102, 126, 234, 0.05);
}

.tab-btn.active {
  color: #667eea;
  border-bottom-color: #667eea;
  font-weight: 600;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

/* Cards */
.card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.card h2 {
  margin-top: 0;
  margin-bottom: 20px;
  color: #1e293b;
  font-size: 20px;
  border-bottom: 2px solid #f1f5f9;
  padding-bottom: 10px;
}

.card h3 {
  margin-top: 0;
  margin-bottom: 15px;
  color: #475569;
  font-size: 16px;
}

/* Formulários */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-bottom: 20px;
}

.form-grid-epi {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 15px;
  margin-bottom: 20px;
}

.form-section {
  background: #f8fafc;
  padding: 20px;
  border-radius: 8px;
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 600;
  color: #334155;
  font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 14px;
  box-sizing: border-box;
  transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Câmera e Captura Facial */
.camera-container {
  position: relative;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 15px;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.camera-container video {
  width: 100%;
  height: auto;
  display: block;
}

.camera-container img {
  width: 100%;
  height: auto;
  display: block;
}

.camera-container-small {
  max-width: 400px;
  margin: 15px auto;
  position: relative;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.camera-container-small video {
  width: 100%;
  height: auto;
}

.camera-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 15px;
}

.face-status {
  padding: 10px;
  border-radius: 6px;
  text-align: center;
  font-weight: 500;
  margin-top: 10px;
}

.face-status.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.face-status.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.face-status.info {
  background: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

/* Botões */
.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-primary:disabled {
  background: #cbd5e1;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background: #e2e8f0;
  color: #475569;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background: #cbd5e1;
}

.btn-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.btn-warning {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-warning:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.btn-large {
  padding: 12px 32px;
  font-size: 16px;
}

.form-actions {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #e2e8f0;
}

/* Lista de Funcionários */
.search-box {
  margin-bottom: 20px;
  display: flex;
  gap: 10px;
}

.search-box input {
  flex: 1;
  padding: 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 14px;
}

.search-box select {
  padding: 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 14px;
}

.func-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 100%;
}

.epi-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 15px;
}

.func-item,
.epi-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 15px;
  transition: all 0.3s ease;
}

.func-item:hover,
.epi-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  border-color: #667eea;
}

.func-item-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 10px;
}

.func-photo {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #667eea;
  cursor: pointer;
}

.func-photo-placeholder {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #cbd5e1 0%, #94a3b8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 24px;
  font-weight: bold;
}

.func-item-info h4 {
  margin: 0 0 5px 0;
  color: #1e293b;
  font-size: 16px;
}

.func-item-info p {
  margin: 2px 0;
  color: #64748b;
  font-size: 13px;
}

.func-item-details {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #e2e8f0;
}

.func-item-details p {
  margin: 5px 0;
  font-size: 13px;
  color: #475569;
}

.func-item-actions {
  margin-top: 10px;
  display: flex;
  gap: 8px;
}

.btn-small {
  padding: 6px 12px;
  font-size: 12px;
}

/* Lista de EPIs */
.epi-item-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 10px;
}

.epi-item-header h4 {
  margin: 0;
  color: #1e293b;
  font-size: 16px;
  flex: 1;
}

.epi-stock {
  background: #667eea;
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.epi-stock.low {
  background: #ef4444;
}

.epi-stock.medium {
  background: #f59e0b;
}

.epi-item-details p {
  margin: 5px 0;
  font-size: 13px;
  color: #475569;
}

.epi-item-actions {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  gap: 8px;
}

/* Sistema de Entrega */
.entrega-container {
  display: grid;
  gap: 20px;
}

.entrega-section {
  background: #f8fafc;
  padding: 20px;
  border-radius: 8px;
  border: 2px solid #e2e8f0;
}

.recognition-methods {
  display: flex;
  gap: 10px;
  margin: 15px 0;
}

#recognitionResult,
#funcSearchResults {
  margin-top: 15px;
}

.selected-func {
  background: white;
  border: 2px solid #10b981;
  border-radius: 8px;
  padding: 15px;
  margin-top: 15px;
}

.selected-func h4 {
  margin: 0 0 10px 0;
  color: #10b981;
  display: flex;
  align-items: center;
  gap: 8px;
}

.selected-func h4::before {
  content: "✓";
  background: #10b981;
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

#epiDetailsArea {
  margin-top: 15px;
  background: white;
  padding: 15px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

/* Histórico */
.filter-historico {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.filter-historico input,
.filter-historico button {
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  font-size: 14px;
}

.filter-historico input[type="text"] {
  flex: 1;
  min-width: 200px;
}

.filter-historico input[type="date"] {
  min-width: 150px;
}

.historico-list {
  display: grid;
  gap: 15px;
}

.historico-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 15px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 15px;
  align-items: center;
}

.historico-date {
  background: #667eea;
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  text-align: center;
  font-weight: 600;
  font-size: 12px;
  min-width: 100px;
}

.historico-info h4 {
  margin: 0 0 5px 0;
  color: #1e293b;
  font-size: 15px;
}

.historico-info p {
  margin: 3px 0;
  color: #64748b;
  font-size: 13px;
}

.historico-quantity {
  background: #f1f5f9;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 600;
  color: #475569;
}

/* Estatísticas */
.statistics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
}

.stat-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 20px;
  border-radius: 8px;
  text-align: center;
}

.stat-card h3 {
  margin: 0 0 10px 0;
  font-size: 14px;
  opacity: 0.9;
}

.stat-card .stat-value {
  font-size: 32px;
  font-weight: bold;
  margin: 0;
}

.stat-card.green {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.stat-card.orange {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.stat-card.red {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

/* Responsividade */
@media (max-width: 768px) {
  .nav-container {
    flex-direction: column;
    height: auto;
    padding: 15px;
  }

  .logo {
    margin-bottom: 10px;
  }

  .nav-menu {
    width: 100%;
    justify-content: center;
  }

  .nav-btn {
    flex: 1;
    justify-content: center;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .func-list,
  .epi-list {
    grid-template-columns: 1fr;
  }

  .epi-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  .tab-btn {
    white-space: nowrap;
  }

  .filter-historico {
    flex-direction: column;
  }

  .filter-historico input,
  .filter-historico button {
    width: 100%;
  }

  .historico-item {
    grid-template-columns: 1fr;
  }

  .statistics-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  table {
    table-layout: fixed;
  }
  th, td {
    padding: 4px;
  }
  body,
  h1,
  .upload-section,
  #message,
  #topInfo,
  table,
  th,
  td,
  select,
  .filter-section label,
  .filter-section select {
    font-size: 0.7em;
  }
  table th,
  table td {
    word-wrap: break-word;
  }
  table th:nth-child(2),
  table td:nth-child(2),
  table th:nth-child(3),
  table td:nth-child(3),
  table th:nth-child(7),
  table td:nth-child(7) {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    white-space: normal;
  }
  table th:nth-child(8),
  table td:nth-child(8) {
    font-size: 0.7em;
  }
}


/* ============================
   Console Viewer (Mobile Debug)
   ============================ */
.epi-tabs {
  flex-wrap: wrap;
  gap: 10px;
}
.epi-tabs .console-btn {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #0f172a;
}
.epi-tabs .console-btn:hover {
  background: #eef2ff;
  border-color: #a5b4fc;
}

.console-modal {
  max-width: 980px;
  width: min(980px, 94vw);
}
.console-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-start;
  margin: 10px 0 12px;
  padding: 10px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  border-radius: 10px;
}
.console-autoscroll {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  color: #334155;
  font-size: 14px;
  user-select: none;
}

.console-output {
  background: #0b1220;
  color: #e2e8f0;
  border-radius: 12px;
  padding: 12px;
  min-height: 50vh;
  max-height: 70vh;
  overflow: auto;
  white-space: pre-wrap;
  word-wrap: break-word;
  border: 1px solid rgba(148,163,184,0.25);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
  line-height: 1.45;
}
.log-line { padding: 2px 0; }
.log-time { color: #94a3b8; margin-right: 8px; }
.log-info  { color: #e2e8f0; }
.log-warn  { color: #fbbf24; }
.log-error { color: #fb7185; }
.log-debug { color: #a78bfa; }

/* Ajuste no z-index para garantir que o modal do console fique acima */
#consoleModal.modal { z-index: 4000; }

/* Modal - Editar EPI */
.epi-edit-modal {
  max-width: 900px;
  width: min(900px, 94vw);
}
.help-text {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: #64748b;
}

/* Ações no histórico */
.historico-item {
  display: grid;
  grid-template-columns: minmax(90px, 140px) 1fr minmax(70px, 90px) minmax(90px, 120px);
  gap: 12px;
  align-items: center;
}
.historico-actions {
  display: flex;
  justify-content: flex-end;
}

/* Garantir que o modal de edição fique acima */
#epiEditModal.modal { z-index: 4100; }


/* ==============================================
   ESTILOS PARA AUTO-ATENDIMENTO
   ============================================== */

.auto-atendimento-card {
  text-align: center;
  padding: 40px 20px;
}

.auto-help-text {
  font-size: 1.3em;
  color: #555;
  margin: 20px 0;
}

.auto-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  max-width: 800px;
  margin: 40px auto;
}

.auto-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 20px;
  padding: 40px 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
  min-height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 15px;
}

.auto-btn:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.25);
}

.auto-icon {
  font-size: 4em;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.auto-label {
  color: white;
  font-size: 1.2em;
  font-weight: bold;
  text-align: center;
  line-height: 1.4;
}

.auto-area {
  margin-top: 40px;
  text-align: center;
  padding: 30px;
  background: white;
  border-radius: 15px;
  box-shadow: 0 2px 15px rgba(0,0,0,0.1);
}

.auto-area h3 {
  color: #667eea;
  margin-bottom: 25px;
  font-size: 1.8em;
}

.auto-input {
  width: 100%;
  max-width: 400px;
  padding: 20px;
  font-size: 1.5em;
  text-align: center;
  border: 3px solid #667eea;
  border-radius: 10px;
  margin-bottom: 20px;
}

.voice-indicator {
  margin: 30px auto;
  max-width: 300px;
}

.voice-animation {
  width: 150px;
  height: 150px;
  margin: 0 auto 20px;
  background: radial-gradient(circle, #667eea 0%, #764ba2 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.voice-animation.active {
  animation: pulse 1.5s ease-in-out infinite;
}

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

.voice-animation::before {
  content: '🎤';
  font-size: 4em;
}

#voiceInstruction {
  font-size: 1.2em;
  color: #555;
  font-weight: 500;
}

.voice-transcript {
  margin: 20px auto;
  padding: 20px;
  background: #f5f5f5;
  border-radius: 10px;
  min-height: 80px;
  font-size: 1.3em;
  color: #333;
  display: none;
}

.voice-transcript.active {
  display: block;
}

.auto-epi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
  margin: 30px 0;
}

.auto-epi-card {
  background: white;
  border: 3px solid #e0e0e0;
  border-radius: 15px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.auto-epi-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.auto-epi-card.selected {
  border-color: #667eea;
  background: linear-gradient(135deg, rgba(102,126,234,0.1) 0%, rgba(118,75,162,0.1) 100%);
}

.auto-epi-icon {
  font-size: 3em;
  margin-bottom: 10px;
}

.auto-epi-name {
  font-size: 1.1em;
  font-weight: bold;
  color: #333;
  margin-bottom: 5px;
}

.auto-epi-stock {
  font-size: 0.9em;
  color: #666;
}

.auto-epi-quantity {
  margin-top: 10px;
  display: none;
}

.auto-epi-card.selected .auto-epi-quantity {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.auto-epi-quantity button {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  border: 2px solid #667eea;
  background: white;
  color: #667eea;
  font-size: 1.2em;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s;
}

.auto-epi-quantity button:hover {
  background: #667eea;
  color: white;
}

.auto-epi-quantity span {
  font-size: 1.3em;
  font-weight: bold;
  min-width: 30px;
}

/* ==============================================
   ESTILOS PARA ASSINATURA
   ============================================== */

.signature-section {
  margin: 30px 0;
  padding: 30px;
  background: #f9fafb;
  border-radius: 15px;
  border: 2px dashed #667eea;
}

.signature-section h3 {
  text-align: center;
  color: #667eea;
  margin-bottom: 10px;
}

.signature-help {
  text-align: center;
  color: #666;
  margin-bottom: 25px;
}

.signature-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.signature-option {
  background: white;
  border: 3px solid #e0e0e0;
  border-radius: 12px;
  padding: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  position: relative;
}

.signature-option:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.signature-option.selected {
  border-color: #667eea;
  background: linear-gradient(135deg, rgba(102,126,234,0.05) 0%, rgba(118,75,162,0.05) 100%);
}

.signature-option.selected::after {
  content: '✓';
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  background: #667eea;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.2em;
}

.signature-preview {
  font-size: 2.5em;
  margin: 15px 0;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #333;
}

.signature-label {
  font-size: 0.9em;
  color: #666;
  font-style: italic;
}

/* Fontes de assinatura */
.sig-style-1 { font-family: 'Brush Script MT', cursive; }
.sig-style-2 { font-family: 'Lucida Handwriting', cursive; }
.sig-style-3 { font-family: 'Segoe Script', cursive; }
.sig-style-4 { font-family: 'Monotype Corsiva', cursive; font-style: italic; }

/* ==============================================
   MELHORIAS NO HISTÓRICO
   ============================================== */

.historico-item {
  background: white;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 15px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: all 0.3s ease;
}

.historico-item:hover {
  box-shadow: 0 4px 15px rgba(0,0,0,0.12);
  transform: translateY(-2px);
}

.historico-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 2px solid #f0f0f0;
}

.historico-colab {
  flex: 1;
}

.historico-colab-nome {
  font-size: 1.2em;
  font-weight: bold;
  color: #333;
  margin-bottom: 5px;
}

.historico-colab-info {
  font-size: 0.9em;
  color: #666;
  line-height: 1.4;
}

.historico-data {
  text-align: right;
}

.historico-data-valor {
  font-size: 1.1em;
  font-weight: bold;
  color: #667eea;
}

.historico-hora-valor {
  font-size: 0.9em;
  color: #888;
}

.historico-body {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  margin-bottom: 15px;
}

.historico-epi-info {
  background: #f9fafb;
  padding: 15px;
  border-radius: 8px;
}

.historico-epi-nome {
  font-size: 1.1em;
  font-weight: bold;
  color: #333;
  margin-bottom: 8px;
}

.historico-epi-detalhes {
  font-size: 0.9em;
  color: #666;
  line-height: 1.6;
}

.historico-quantidade {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 15px;
  border-radius: 8px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.historico-quantidade-label {
  font-size: 0.9em;
  margin-bottom: 5px;
  opacity: 0.9;
}

.historico-quantidade-valor {
  font-size: 2em;
  font-weight: bold;
}

.historico-valores {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: #f0f9ff;
  padding: 1rem;
  border-radius: 8px;
  border: 2px solid #3b82f6;
}

.historico-valor-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.historico-valor-label {
  font-size: 0.85rem;
  color: #64748b;
  font-weight: 500;
}

.historico-valor-numero {
  font-size: 1.1rem;
  font-weight: bold;
  color: #1e40af;
}

.historico-valor-numero.total {
  font-size: 1.3rem;
  color: #10b981;
}

.historico-observacao {
  background: #fff9e6;
  padding: 12px;
  border-radius: 8px;
  border-left: 4px solid #ffc107;
  margin-bottom: 15px;
  font-size: 0.95em;
  color: #666;
  font-style: italic;
}

.historico-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.historico-btn {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9em;
  transition: all 0.2s;
}

.historico-btn-relatorio {
  background: #4caf50;
  color: white;
}

.historico-btn-relatorio:hover {
  background: #45a049;
  transform: translateY(-2px);
}

.historico-btn-excluir {
  background: #f44336;
  color: white;
}

.historico-btn-excluir:hover {
  background: #da190b;
  transform: translateY(-2px);
}

/* Modal de Relatório */
.relatorio-modal {
  max-width: 800px;
}

.relatorio-content {
  margin: 20px 0;
  max-height: 500px;
  overflow-y: auto;
}

.relatorio-info {
  background: #f9fafb;
  padding: 20px;
  border-radius: 10px;
  margin-bottom: 20px;
}

.relatorio-info h4 {
  color: #667eea;
  margin-bottom: 15px;
  font-size: 1.1em;
}

.relatorio-info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  font-size: 0.95em;
}

.relatorio-info-item {
  padding: 8px;
  background: white;
  border-radius: 5px;
}

.relatorio-info-label {
  font-weight: bold;
  color: #555;
  margin-right: 8px;
}

.relatorio-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
}

.relatorio-table th,
.relatorio-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #e0e0e0;
}

.relatorio-table th {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  font-weight: bold;
}

.relatorio-table tbody tr:hover {
  background: #f9fafb;
}

.relatorio-declaracao {
  margin: 30px 0;
  padding: 25px;
  background: #f9fafb;
  border-radius: 10px;
  border: 2px solid #667eea;
  text-align: justify;
  line-height: 1.8;
  font-size: 1.05em;
}

.relatorio-assinatura {
  margin-top: 50px;
  text-align: center;
}

.relatorio-assinatura-linha {
  border-top: 2px solid #333;
  width: 300px;
  margin: 0 auto 10px;
  padding-top: 10px;
}

.relatorio-assinatura-nome {
  font-size: 2em;
  margin-bottom: 5px;
}

.relatorio-assinatura-info {
  font-size: 0.9em;
  color: #666;
}

/* Indicador de qualidade da foto */
.face-confidence {
  margin-top: 15px;
  padding: 15px;
  border-radius: 8px;
  text-align: center;
  font-weight: bold;
  display: none;
}

.face-confidence.good {
  background: #d4edda;
  color: #155724;
  border: 2px solid #c3e6cb;
  display: block;
}

.face-confidence.medium {
  background: #fff3cd;
  color: #856404;
  border: 2px solid #ffeaa7;
  display: block;
}

.face-confidence.poor {
  background: #f8d7da;
  color: #721c24;
  border: 2px solid #f5c6cb;
  display: block;
}

/* Responsivo */
@media (max-width: 768px) {
  .auto-buttons {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .auto-btn {
    min-height: 150px;
    padding: 30px 15px;
  }
  
  .auto-icon {
    font-size: 3em;
  }
  
  .signature-options {
    grid-template-columns: 1fr;
  }
  
  .historico-body {
    grid-template-columns: 1fr;
  }
  
  .relatorio-info-grid {
    grid-template-columns: 1fr;
  }
}
/* ==============================================
   MELHORIAS PARA O SISTEMA EPI
   ============================================== */

/* Badge de Confiança dos Colaboradores */
.conf-badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.85em;
  font-weight: 600;
  margin-top: 5px;
}

.conf-excellent {
  background-color: #d1fae5;
  color: #065f46;
  border: 1px solid #10b981;
}

.conf-good {
  background-color: #dbeafe;
  color: #1e40af;
  border: 1px solid #3b82f6;
}

.conf-low {
  background-color: #fee2e2;
  color: #991b1b;
  border: 1px solid #ef4444;
}

/* ==============================================
   HISTÓRICO MELHORADO
   ============================================== */

.historico-actions {
  display: flex;
  gap: 10px;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid #e2e8f0;
}

.historico-item {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 15px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  transition: all 0.3s ease;
}

.historico-item:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}

.historico-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 2px solid #f1f5f9;
}

.historico-colab {
  flex: 1;
}

.historico-colab-nome {
  font-size: 1.2em;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.historico-colab-info {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.info-badge {
  display: inline-block;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.85em;
  color: #475569;
}

.info-badge strong {
  color: #1e293b;
  margin-right: 4px;
}

.historico-data {
  text-align: right;
  min-width: 150px;
}

.historico-data-valor {
  font-size: 1.1em;
  font-weight: 600;
  color: #667eea;
  margin-bottom: 5px;
}

.historico-hora-valor {
  font-size: 0.95em;
  color: #64748b;
  font-weight: 500;
}

.historico-body {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: center;
  padding: 15px;
  background: #f8fafc;
  border-radius: 8px;
  margin-bottom: 10px;
}

.historico-epi-info {
  flex: 1;
}

.historico-epi-nome {
  font-size: 1.1em;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 8px;
}

.historico-epi-detalhes {
  color: #64748b;
  font-size: 0.9em;
  line-height: 1.6;
}

.historico-quantidade {
  text-align: center;
  padding: 15px 25px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 12px;
  color: white;
}

.historico-quantidade-label {
  font-size: 0.75em;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.9;
  margin-bottom: 5px;
}

.historico-quantidade-valor {
  font-size: 2em;
  font-weight: 700;
}

.historico-observacao {
  background: #fffbeb;
  border: 1px solid #fbbf24;
  border-left: 4px solid #f59e0b;
  padding: 12px;
  border-radius: 6px;
  margin-top: 10px;
  color: #92400e;
  font-size: 0.95em;
}

.historico-btn {
  padding: 10px 20px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9em;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.historico-btn-relatorio {
  background: #667eea;
  color: white;
}

.historico-btn-relatorio:hover {
  background: #5568d3;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.historico-btn-excluir {
  background: #ef4444;
  color: white;
}

.historico-btn-excluir:hover {
  background: #dc2626;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(239, 68, 68, 0.3);
}

/* ==============================================
   MELHORIAS NAS ESTATÍSTICAS
   ============================================== */

.stat-card {
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  transform: rotate(45deg);
}

.stat-card h3,
.stat-card .stat-value {
  position: relative;
  z-index: 1;
}

/* ==============================================
   RELATÓRIO INDIVIDUAL
   ============================================== */

.relatorio-modal {
  max-width: 900px;
}

.relatorio-content {
  max-height: 600px;
  overflow-y: auto;
  padding: 20px;
}

.relatorio-info {
  background: #f8fafc;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  border: 1px solid #e2e8f0;
}

.relatorio-info h4 {
  color: #1e293b;
  margin: 0 0 15px 0;
  font-size: 1.1em;
  padding-bottom: 10px;
  border-bottom: 2px solid #667eea;
}

.relatorio-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 12px;
}

.relatorio-info-item {
  padding: 10px;
  background: white;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
}

.relatorio-info-label {
  font-weight: 700;
  color: #475569;
  margin-right: 8px;
}

.relatorio-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  background: white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  border-radius: 8px;
  overflow: hidden;
}

.relatorio-table thead {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.relatorio-table th {
  padding: 15px;
  text-align: left;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.85em;
  letter-spacing: 0.5px;
}

.relatorio-table td {
  padding: 12px 15px;
  border-bottom: 1px solid #e2e8f0;
  color: #475569;
}

.relatorio-table tbody tr:hover {
  background: #f8fafc;
}

.relatorio-declaracao {
  background: #fffbeb;
  border: 2px solid #fbbf24;
  border-radius: 8px;
  padding: 20px;
  margin: 25px 0;
}

.relatorio-declaracao p {
  margin: 12px 0;
  line-height: 1.7;
  color: #78350f;
  text-align: justify;
}

.relatorio-declaracao strong {
  color: #92400e;
}

.relatorio-assinatura {
  margin-top: 40px;
  padding: 20px;
  border-top: 2px solid #e2e8f0;
}

.relatorio-assinatura-linha {
  border-bottom: 2px solid #1e293b;
  padding-bottom: 10px;
  margin-bottom: 15px;
  min-height: 60px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.relatorio-assinatura-nome {
  font-size: 1.8em;
  font-weight: 400;
}

.relatorio-assinatura-info {
  text-align: center;
  color: #64748b;
  line-height: 1.8;
  font-size: 0.95em;
}

/* ==============================================
   RESPONSIVIDADE DO HISTÓRICO
   ============================================== */

@media (max-width: 768px) {
  .historico-header {
    flex-direction: column;
    gap: 15px;
  }
  
  .historico-data {
    text-align: left;
  }
  
  .historico-body {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .historico-quantidade {
    padding: 15px;
  }
  
  .historico-colab-info {
    flex-direction: column;
  }
  
  .info-badge {
    display: block;
  }
  
  .historico-actions {
    flex-direction: column;
    gap: 8px;
  }
  
  .historico-btn {
    width: 100%;
    justify-content: center;
  }
  
  .relatorio-info-grid {
    grid-template-columns: 1fr;
  }
}

/* ==============================================
   MELHORIAS NO BOTÃO DE EDITAR
   ============================================== */

.func-actions {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

.func-actions button {
  flex: 1;
  min-width: 100px;
}

/* ==============================================
   HISTÓRICO ACTIONS APRIMORADO
   ============================================== */

.historico-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

@media (max-width: 600px) {
  .historico-actions {
    justify-content: stretch;
  }
  
  .historico-btn {
    flex: 1;
    min-width: 120px;
  }
}



/* ==============================================
   MELHORIAS v2.0 - NOVOS ESTILOS
   ============================================== */

/* Canvas de Assinatura Desenhada */
.assinatura-desenhada-section {
  margin-top: 2rem;
  padding: 1.5rem;
  background: #f9fafb;
  border-radius: 12px;
  border: 2px dashed #e5e7eb;
}

.assinatura-desenhada-section h4 {
  margin-bottom: 1rem;
  color: #1f2937;
}

#canvasAssinatura {
  width: 100%;
  max-width: 600px;
  height: 200px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  background: white;
  cursor: crosshair;
  touch-action: none;
  display: block;
  margin: 0 auto;
}

#limparAssinatura {
  background: #f59e0b;
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  margin-top: 1rem;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

#limparAssinatura:hover {
  background: #d97706;
  transform: translateY(-2px);
}

/* Layout Novo dos Colaboradores */
.colaborador-card-v2 {
  background: #ffffff;
  border-radius: 16px;
  padding: 2rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
  display: grid;
  grid-template-columns: 200px 1fr auto;
  gap: 2rem;
  align-items: start;
  transition: all 0.3s ease;
}

.colaborador-card-v2:hover {
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.colab-foto-container {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.foto-pequena {
  width: 180px;
  height: 180px;
  border-radius: 12px;
  object-fit: cover;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 3px solid #e5e7eb;
}

.foto-pequena:hover {
  transform: scale(1.05);
  border-color: #667eea;
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

.badge-confianca-mini {
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
}

.badge-confianca-mini.conf-excellent {
  background: #d1fae5;
  color: #065f46;
  border: 2px solid #10b981;
}

.badge-confianca-mini.conf-good {
  background: #dbeafe;
  color: #1e40af;
  border: 2px solid #3b82f6;
}

.badge-confianca-mini.conf-low {
  background: #fee2e2;
  color: #991b1b;
  border: 2px solid #ef4444;
}

.colab-dados {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.colab-nome-principal {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 0.5rem;
}

.colab-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 0.75rem;
}

.info-item {
  background: #f9fafb;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
}

.info-item strong {
  color: #6b7280;
  font-weight: 600;
}

.colab-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.colab-actions button {
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  white-space: nowrap;
  border: none;
  cursor: pointer;
  color: white;
}

.colab-actions button:first-child {
  background: #3b82f6;
}

.colab-actions button:nth-child(2) {
  background: #f59e0b;
}

.colab-actions button:last-child {
  background: #ef4444;
}

.colab-actions button:hover {
  transform: translateX(5px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
}

/* Modal Ampliar Foto */
.modal-ampliar-foto {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.9);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.modal-ampliar-foto.active {
  display: flex;
}

.foto-ampliada-container {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.foto-ampliada {
  max-width: 100%;
  max-height: 80vh;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.btn-fechar-modal {
  position: absolute;
  top: -40px;
  right: 0;
  background: white;
  color: #1f2937;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
}

.btn-fechar-modal:hover {
  background: #ef4444;
  color: white;
  transform: rotate(90deg);
}

.btn-nova-foto {
  background: #667eea;
  color: white;
  padding: 1rem 2rem;
  border-radius: 12px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-nova-foto:hover {
  background: #5568d3;
  transform: translateY(-2px);
}

/* Registro Fotográfico na Entrega */
.foto-entrega-section {
  margin-top: 2rem;
  padding: 1.5rem;
  background: #f9fafb;
  border-radius: 12px;
  border: 2px dashed #e5e7eb;
}

.foto-entrega-section h4 {
  margin-bottom: 1rem;
  color: #1f2937;
}

#videoRegistro {
  width: 100%;
  max-width: 640px;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
}

#fotoRegistroPreview {
  max-width: 640px;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
  cursor: pointer;
  transition: all 0.3s ease;
}

#fotoRegistroPreview:hover {
  transform: scale(1.02);
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

.historico-foto {
  margin-top: 1.5rem;
  text-align: center;
}

.foto-entrega-thumb {
  max-width: 300px;
  max-height: 200px;
  border-radius: 12px;
  object-fit: cover;
  cursor: pointer;
  border: 3px solid #e5e7eb;
  transition: all 0.3s ease;
}

.foto-entrega-thumb:hover {
  transform: scale(1.05);
  border-color: #667eea;
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

/* Modal Devolução/Troca */
.modal-devolucao {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.modal-devolucao-content {
  background: #ffffff;
  border-radius: 16px;
  padding: 2rem;
  max-width: 800px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-devolucao-content h3 {
  margin-bottom: 1.5rem;
  color: #1f2937;
}

.epi-devolucao-item {
  background: #f9fafb;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.epi-devolucao-item .epi-info {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.epi-devolucao-item .epi-info strong {
  font-size: 1.125rem;
  color: #1f2937;
}

.epi-devolucao-item .epi-info span {
  font-size: 0.9rem;
  color: #6b7280;
}

.epi-devolucao-item .epi-actions {
  display: flex;
  gap: 1rem;
}

.epi-devolucao-item button {
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  color: white;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.epi-devolucao-item button:first-child {
  background: #3b82f6;
}

.epi-devolucao-item button:last-child {
  background: #f59e0b;
}

.epi-devolucao-item button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
}

.empty-state {
  text-align: center;
  padding: 3rem 2rem;
  color: #6b7280;
  font-size: 1.125rem;
}

/* Badges de Tipo de Operação */
.historico-tipo-badge {
  position: absolute;
  top: 0;
  right: 0;
  padding: 0.5rem 1.5rem;
  font-weight: 700;
  font-size: 0.85rem;
  border-bottom-left-radius: 12px;
  color: white;
}

.tipo-entrega .historico-tipo-badge {
  background: linear-gradient(135deg, #10b981, #059669);
}

.tipo-devolucao .historico-tipo-badge {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.tipo-troca .historico-tipo-badge {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}

/* Responsividade */
@media (max-width: 1024px) {
  .colaborador-card-v2 {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 1.5rem;
  }
  
  .colab-foto-container {
    justify-content: center;
  }
  
  .colab-info-grid {
    grid-template-columns: 1fr;
  }
  
  .colab-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }
  
  .colab-actions button {
    flex: 1;
    min-width: 120px;
  }
}

@media (max-width: 768px) {
  /* Melhorias gerais para mobile */
  .colaborador-card-v2 {
    padding: 1.25rem;
    gap: 1.25rem;
  }
  
  .colab-nome-principal {
    font-size: 1.35rem;
    text-align: center;
  }
  
  .info-item {
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
  }
  
  .info-item strong {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.85rem;
  }
  
  .colab-actions {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .colab-actions button {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
  }
  
  .foto-pequena {
    width: 150px;
    height: 150px;
  }
  
  .badge-confianca-mini {
    font-size: 0.8rem;
    padding: 0.35rem 0.85rem;
  }
  
  .epi-devolucao-item {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }
  
  .epi-devolucao-item .epi-actions {
    flex-direction: column;
  }
  
  .epi-devolucao-item button {
    width: 100%;
  }
}

/* Smartphones muito pequenos */
@media (max-width: 480px) {
  .colaborador-card-v2 {
    padding: 1rem;
    gap: 1rem;
    border-radius: 12px;
  }
  
  .colab-nome-principal {
    font-size: 1.25rem;
  }
  
  .foto-pequena {
    width: 120px;
    height: 120px;
  }
  
  .info-item {
    padding: 0.65rem 0.85rem;
    font-size: 0.9rem;
  }
  
  .badge-confianca-mini {
    font-size: 0.75rem;
    padding: 0.3rem 0.75rem;
  }
  
  .colab-actions button {
    padding: 0.9rem;
    font-size: 0.95rem;
  }
}

/* ==========================================
   BOTÃO FLUTUANTE DE CONSOLE
   ========================================== */
.btn-console-float {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border: none;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 600;
  z-index: 9999;
  transition: all 0.3s ease;
}

.btn-console-float:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
  background: linear-gradient(135deg, #764ba2, #667eea);
}

.btn-console-float:active {
  transform: translateY(-1px);
}

@media (max-width: 768px) {
  .btn-console-float {
    bottom: 15px;
    right: 15px;
    width: 55px;
    height: 55px;
    font-size: 1rem;
  }
}

/* ==========================================
   MELHORIAS MOBILE - TABELA DE PRESENÇA
   ========================================== */

/* Mobile: Transformar tabela em cards */
@media (max-width: 768px) {
  .table-responsive {
    overflow-x: visible;
  }
  
  /* Esconder cabeçalho da tabela */
  #tabelaPresenca thead {
    display: none;
  }
  
  /* Transformar linhas em cards - MELHORADO */
  #tabelaPresenca tbody tr {
    display: block;
    margin-bottom: 1.5rem;
    border: 3px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.25rem;
    background: white !important;
    box-shadow: 0 4px 8px rgba(0,0,0,0.12);
  }
  
  /* Células como linhas - MELHORADO */
  #tabelaPresenca tbody td {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0.85rem 0;
    border: none;
    border-bottom: 1px solid #e5e7eb;
    font-size: 1rem;
    line-height: 1.5;
    gap: 1rem;
  }
  
  #tabelaPresenca tbody td:last-child {
    border-bottom: none;
  }
  
  /* Adicionar labels antes dos dados - MELHORADO */
  #tabelaPresenca tbody td::before {
    content: attr(data-label);
    font-weight: 700;
    color: #1f2937;
    min-width: 110px;
    max-width: 110px;
    flex-shrink: 0;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
  
  /* Valor das células */
  #tabelaPresenca tbody td {
    word-break: break-word;
  }
  
  /* Cores especiais mantidas - MELHORADO */
  #tabelaPresenca tbody tr.presente {
    border-left: 5px solid #10b981;
    background: linear-gradient(to right, #f0fdf4, #ffffff) !important;
  }
  
  #tabelaPresenca tbody tr.falta {
    border-left: 5px solid #ef4444;
    background: linear-gradient(to right, #fef2f2, #ffffff) !important;
  }
  
  #tabelaPresenca tbody tr.importado {
    border-left: 5px solid #f59e0b;
    background: linear-gradient(to right, #fffbeb, #ffffff) !important;
  }
  
  /* Selects e textareas - MELHORADO */
  #tabelaPresenca tbody td select,
  #tabelaPresenca tbody td textarea {
    font-size: 1rem !important;
    padding: 0.75rem !important;
    min-height: 44px !important;
    width: 100% !important;
    border: 2px solid #d1d5db !important;
    border-radius: 8px !important;
  }
  
  /* Aumentar áreas de toque - MELHORADO */
  .sortBtn,
  button,
  select {
    min-height: 48px;
    padding: 0.85rem 1.15rem;
    font-size: 1rem;
  }
  
  /* Upload section em coluna */
  .upload-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .upload-section input,
  .upload-section button {
    width: 100%;
  }
  
  /* Filtros em coluna */
  .filter-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .filter-section label {
    font-weight: 600;
    margin-bottom: 0.25rem;
  }
  
  .filter-section select {
    width: 100%;
  }
  
  /* Top info mais legível */
  #topInfo {
    font-size: 1.15rem;
    line-height: 1.8;
    padding: 1.25rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
  }
  
  #topInfo span {
    font-weight: 700;
    font-size: 1.4rem;
    display: inline-block;
    margin: 0 0.25rem;
  }
  
  /* Título da página melhorado */
  .container h1 {
    font-size: 1.75rem;
    text-align: center;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
  }
  
  /* Mensagens melhoradas */
  #message {
    font-size: 1.1rem;
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 10px;
    text-align: center;
  }
    line-height: 1.8;
    padding: 1rem;
    border-radius: 8px;
    background: #f9fafb;
  }
  
  #topInfo span {
    font-weight: 700;
    font-size: 1.3rem;
  }
}

/* Melhorias para telas muito pequenas */
@media (max-width: 480px) {
  #tabelaPresenca tbody td {
    font-size: 0.9rem;
    padding: 0.5rem 0;
  }
  
  #tabelaPresenca tbody td::before {
    font-size: 0.85rem;
    min-width: 90px;
  }
  
  .btn-console-float {
    bottom: 10px;
    right: 10px;
    width: 50px;
    height: 50px;
    font-size: 0.9rem;
  }
  
  .container {
    padding: 1rem;
  }
  
  h1 {
    font-size: 1.5rem;
  }
}
/* ==============================================
   PAINEL DE OPERAÇÕES (ENTREGA / DEVOLUÇÃO / TROCA)
   ============================================== */

.painel-operacoes-epi {
  display: flex;
  gap: 15px;
  margin: 20px 0 30px 0;
  justify-content: center;
}

.op-btn {
  padding: 12px 28px;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.08);
}

.op-btn.entrega {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
}

.op-btn.devolucao {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
}

.op-btn.troca {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
}

.op-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0,0,0,0.12);
}

.op-btn:active {
  transform: scale(0.97);
}


/* ==============================================
   CAMPOS EXTRAS PARA TROCA (MODAL DEVOLUÇÃO/TROCA)
   ============================================== */

.troca-extra-fields {
  margin-top: 2rem;
  padding: 1.5rem;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.troca-extra-fields label {
  font-weight: 600;
  color: #374151;
  font-size: 0.95rem;
}

.troca-extra-fields select,
.troca-extra-fields input {
  padding: 12px;
  font-size: 1rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  transition: 0.25s;
}

.troca-extra-fields select:focus,
.troca-extra-fields input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102,126,234,0.25);
}

/* ==============================================
   MENSAGENS DE VALIDAÇÃO
   ============================================== */

.validation-message {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.validation-message.error {
  color: #dc2626;
  display: flex !important;
  align-items: center;
  gap: 0.25rem;
}

.validation-message.error::before {
  content: '❌';
}

.validation-message.success {
  color: #10b981;
  display: flex !important;
  align-items: center;
  gap: 0.25rem;
}

.validation-message.success::before {
  content: '✅';
}

.validation-message.warning {
  color: #f59e0b;
  display: flex !important;
  align-items: center;
  gap: 0.25rem;
}

.validation-message.warning::before {
  content: '⚠️';
}

/* ==============================================
   RANKING E ESTATÍSTICAS
   ============================================== */

.ranking-card {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  color: white;
}

.ranking-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0 0;
}

.ranking-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem;
  margin-bottom: 0.5rem;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  transition: 0.3s;
}

.ranking-item:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateX(5px);
}

.ranking-position {
  font-size: 1.5rem;
  font-weight: bold;
  min-width: 3rem;
}

.ranking-item.rank-1 .ranking-position {
  color: #ffd700;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.ranking-item.rank-2 .ranking-position {
  color: #c0c0c0;
}

.ranking-item.rank-3 .ranking-position {
  color: #cd7f32;
}

.ranking-name {
  flex: 1;
  font-weight: 500;
}

.ranking-value {
  font-weight: bold;
  font-size: 1.1rem;
}

.stat-card.blue {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
}

/* ==============================================
   TABELA DE EPIs
   ============================================== */

.epi-table-container {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.epi-table-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  font-weight: 600;
  font-size: 0.9rem;
  position: sticky;
  top: 0;
  z-index: 10;
}

.epi-table-row {
  display: grid;
  grid-template-columns: 50px 2fr 1.5fr 120px 100px 100px 120px 140px 100px;
  gap: 12px;
  padding: 12px 16px;
  align-items: center;
  border-bottom: 1px solid #e5e7eb;
  transition: all 0.2s;
}

.epi-table-row.header-row {
  border-bottom: none;
  padding: 16px;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.epi-table-row:not(.header-row):hover {
  background: #f9fafb;
  transform: scale(1.01);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.epi-table-row.estoque-baixo-row {
  background: #fef2f2;
  border-left: 4px solid #ef4444;
}

.epi-table-row.estoque-baixo-row:hover {
  background: #fee2e2;
}

.epi-col-icon {
  font-size: 1.8rem;
  text-align: center;
}

.epi-col-nome {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.epi-nome-principal {
  font-weight: 600;
  color: #1f2937;
  font-size: 0.95rem;
}

.epi-ca-info {
  font-size: 0.8rem;
  color: #6b7280;
  font-weight: 500;
}

.epi-col-tipo {
  font-size: 0.85rem;
  color: #4b5563;
}

.epi-col-qtd {
  font-weight: 600;
  font-size: 1rem;
  color: #1f2937;
}

.qtd-valor {
  font-size: 1.2rem;
  color: #3b82f6;
}

.epi-col-min {
  text-align: center;
  font-weight: 500;
  color: #6b7280;
}

.epi-col-validade {
  text-align: center;
  font-weight: 500;
  color: #6b7280;
}

.epi-col-valor {
  font-weight: 600;
  color: #059669;
  text-align: right;
}

.epi-col-total {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-end;
}

.valor-total-destaque {
  font-weight: 700;
  font-size: 1.1rem;
  color: #10b981;
}

.badge-estoque-baixo {
  display: inline-block;
  padding: 2px 8px;
  background: #ef4444;
  color: white;
  font-size: 0.7rem;
  border-radius: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.epi-col-acoes {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.btn-icon {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.btn-icon svg {
  width: 18px;
  height: 18px;
}

.btn-edit {
  background: #dbeafe;
  color: #1e40af;
}

.btn-edit:hover {
  background: #3b82f6;
  color: white;
  transform: scale(1.1);
}

.btn-delete {
  background: #fee2e2;
  color: #991b1b;
}

.btn-delete:hover {
  background: #ef4444;
  color: white;
  transform: scale(1.1);
}

/* Responsividade */
@media (max-width: 1400px) {
  .epi-table-row {
    grid-template-columns: 40px 2fr 1fr 100px 80px 80px 100px 120px 80px;
    gap: 8px;
    font-size: 0.85rem;
  }
  
  .epi-col-icon {
    font-size: 1.5rem;
  }
  
  .epi-nome-principal {
    font-size: 0.9rem;
  }
}

@media (max-width: 1200px) {
  .epi-table-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .epi-col-nome,
  .epi-col-tipo,
  .epi-col-qtd,
  .epi-col-min,
  .epi-col-validade,
  .epi-col-valor,
  .epi-col-total {
    display: grid;
    grid-template-columns: 120px 1fr;
    align-items: center;
  }
  
  .epi-col-nome::before,
  .epi-col-tipo::before,
  .epi-col-qtd::before,
  .epi-col-min::before,
  .epi-col-validade::before,
  .epi-col-valor::before,
  .epi-col-total::before {
    content: attr(data-label);
    font-weight: 600;
    color: #6b7280;
  }
  
  .epi-table-header {
    display: none;
  }
}
/* ============================================== */
/* ESTILOS PARA SISTEMA DE LOGIN */
/* ============================================== */
.login-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.login-container {
  width: 100%;
  max-width: 450px;
  padding: 20px;
}

.login-card {
  background: white;
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
  animation: slideUp 0.5s ease;
}

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

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

.login-header h1 {
  margin: 0;
  font-size: 36px;
  color: #667eea;
  margin-bottom: 10px;
}

.login-header p {
  margin: 0;
  color: #666;
  font-size: 16px;
}

.login-form .form-group {
  margin-bottom: 20px;
}

.login-form label {
  display: block;
  margin-bottom: 8px;
  color: #333;
  font-weight: 600;
}

.login-form input {
  width: 100%;
  padding: 12px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 16px;
  transition: border-color 0.3s;
}

.login-form input:focus {
  outline: none;
  border-color: #667eea;
}

.btn-login {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s;
}

.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.login-error {
  margin-top: 15px;
  padding: 12px;
  background: #ffebee;
  color: #c62828;
  border-radius: 8px;
  text-align: center;
  font-size: 14px;
}

/* Nav user info */
.nav-user {
  display: flex;
  align-items: center;
  gap: 15px;
  color: white;
}

.nav-user span {
  font-size: 14px;
  font-weight: 500;
}

.btn-logout {
  background: rgba(255,255,255,0.2);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s;
}

.btn-logout:hover {
  background: rgba(255,255,255,0.3);
}

/* ============================================== */
/* ESTILOS PARA GERENCIAMENTO DE USUÁRIOS */
/* ============================================== */
.form-grid-usuario {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.permissoes-section {
  margin-top: 30px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 10px;
}

.permissoes-section h3 {
  margin-top: 0;
  color: #333;
}

.permissoes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 15px;
  margin-top: 20px;
}

.permissao-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: white;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
}

.permissao-item:hover {
  background: #e3f2fd;
  transform: translateX(5px);
}

.permissao-item input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
}

.permissao-item span {
  font-size: 14px;
  color: #333;
}

.usuarios-list {
  display: grid;
  gap: 20px;
  margin-top: 20px;
}

.usuario-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: transform 0.2s;
}

.usuario-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.usuario-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 2px solid #f0f0f0;
}

.usuario-nome h3 {
  margin: 0 0 8px 0;
  color: #333;
  font-size: 20px;
}

.badge-tipo, .badge-status {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  margin-right: 8px;
}

.badge-master {
  background: linear-gradient(135deg, #ffd700, #ffed4e);
  color: #333;
}

.badge-gerencial {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
}

.badge-almoxarifado {
  background: linear-gradient(135deg, #f093fb, #f5576c);
  color: white;
}

.badge-tecnico {
  background: linear-gradient(135deg, #4facfe, #00f2fe);
  color: white;
}

.badge-ativo {
  background: #4caf50;
  color: white;
}

.badge-inativo {
  background: #f44336;
  color: white;
}

.usuario-acoes {
  display: flex;
  gap: 8px;
}

.btn-small {
  padding: 6px 12px;
  font-size: 13px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-small:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.btn-warning {
  background: #ff9800;
  color: white;
}

.btn-danger {
  background: #f44336;
  color: white;
}

.usuario-info {
  margin-bottom: 15px;
}

.info-row {
  display: flex;
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
}

.info-row:last-child {
  border-bottom: none;
}

.info-label {
  font-weight: 600;
  color: #666;
  width: 120px;
  flex-shrink: 0;
}

.usuario-permissoes {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 2px solid #f0f0f0;
}

.permissoes-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.permissao-badge {
  background: #e3f2fd;
  color: #1976d2;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

/* ============================================== */
/* ESTILOS PARA ABA DE ESTOQUE */
/* ============================================== */
.estoque-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}

.estoque-linha {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 20px;
  background: white;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: all 0.2s;
  gap: 15px;
}

.estoque-linha:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  transform: translateX(5px);
}

.estoque-linha.baixo-estoque {
  border-left: 4px solid #ff9800;
  background: #fff3e0;
}

.estoque-linha.sem-estoque {
  border-left: 4px solid #f44336;
  background: #ffebee;
}

.estoque-col {
  display: flex;
  flex-direction: column;
  min-width: 80px;
}

.estoque-nome {
  flex: 2;
  min-width: 200px;
}

.estoque-nome strong {
  font-size: 16px;
  color: #333;
  margin-bottom: 5px;
}

.badge-alerta {
  display: inline-block;
  background: #ff9800;
  color: white;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  margin-top: 5px;
}

.badge-alerta-critico {
  display: inline-block;
  background: #f44336;
  color: white;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  margin-top: 5px;
}

.estoque-label {
  font-size: 11px;
  color: #666;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 3px;
}

.estoque-valor {
  font-size: 18px;
  font-weight: 700;
  color: #667eea;
}

.estoque-valor-destaque {
  font-size: 16px;
  font-weight: 700;
  color: #4caf50;
}

.estoque-ca {
  flex: 1;
}

.estoque-tipo {
  flex: 1.5;
}

.estoque-quantidade {
  flex: 1;
  text-align: center;
}

.estoque-minimo {
  flex: 1;
  text-align: center;
}

.estoque-valor-unit {
  flex: 1;
  text-align: right;
}

.estoque-valor-total {
  flex: 1;
  text-align: right;
}

@media (max-width: 1200px) {
  .estoque-linha {
    flex-wrap: wrap;
  }
  
  .estoque-col {
    min-width: 120px;
  }
}

/* ============================================== */
/* ESTILOS ADICIONAIS */
/* ============================================== */
.historico-usuario {
  padding: 8px 12px;
  background: #e3f2fd;
  border-radius: 6px;
  margin-top: 8px;
  font-size: 14px;
  color: #1976d2;
}

.historico-usuario strong {
  font-weight: 600;
}

.assinatura-digitalizada {
  max-width: 150px;
  height: auto;
  margin-left: 20px;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 5px;
  background: white;
}

/* Responsividade */
@media (max-width: 768px) {
  .nav-menu {
    flex-wrap: wrap;
  }
  
  .form-grid-usuario {
    grid-template-columns: 1fr;
  }
  
  .permissoes-grid {
    grid-template-columns: 1fr;
  }
  
  .estoque-linha {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .estoque-col {
    width: 100%;
    flex-direction: row;
    justify-content: space-between;
    padding: 5px 0;
  }
}


/* ==============================================
   LAYOUT HORIZONTAL DE EPIs
   ============================================== */
.epi-list-horizontal {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.epi-linha {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  transition: all 0.2s;
}

.epi-linha:hover {
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}

.epi-linha.baixo-estoque {
  border-left: 4px solid #f59e0b;
  background: #fffbeb;
}

.epi-linha.sem-estoque {
  border-left: 4px solid #ef4444;
  background: #fef2f2;
}

.epi-col {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.epi-col.epi-nome {
  flex: 2;
  min-width: 200px;
}

.epi-col.epi-nome strong {
  font-size: 1.1rem;
  color: #1f2937;
}

.epi-col.epi-ca,
.epi-col.epi-tipo {
  flex: 1;
  min-width: 120px;
}

.epi-col.epi-quantidade,
.epi-col.epi-minimo {
  flex: 0.5;
  min-width: 80px;
  text-align: center;
}

.epi-col.epi-valor-unit,
.epi-col.epi-valor-total {
  flex: 1;
  min-width: 100px;
  text-align: right;
}

.epi-col.epi-acoes {
  flex: 0;
  min-width: 200px;
  flex-direction: row;
  gap: 8px;
  justify-content: flex-end;
}

.epi-label {
  font-size: 0.75rem;
  color: #6b7280;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.epi-valor {
  font-size: 1.25rem;
  font-weight: 700;
  color: #3b82f6;
}

.epi-valor-destaque {
  font-size: 1.1rem;
  font-weight: 700;
  color: #10b981;
}

.badge-alerta {
  display: inline-block;
  padding: 4px 8px;
  background: #f59e0b;
  color: white;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-left: 8px;
}

.badge-alerta-critico {
  display: inline-block;
  padding: 4px 8px;
  background: #ef4444;
  color: white;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-left: 8px;
}

.btn-small {
  padding: 6px 12px;
  font-size: 0.85rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-edit {
  background: #3b82f6;
  color: white;
}

.btn-edit:hover {
  background: #2563eb;
}

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

.btn-delete:hover {
  background: #dc2626;
}

/* ==============================================
   ESTATÍSTICAS MELHORADAS
   ============================================== */
.estatisticas-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.stat-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  transition: all 0.3s;
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 12px rgba(0,0,0,0.15);
}

.stat-card.clickable {
  cursor: pointer;
}

.stat-card.clickable:hover {
  transform: translateY(-8px) scale(1.02);
}

.stat-card.green {
  background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.stat-card.orange {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.stat-card.red {
  background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.stat-card.blue {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.stat-card h3 {
  margin: 0 0 15px 0;
  font-size: 1.1rem;
  font-weight: 600;
  opacity: 0.95;
  text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.stat-value {
  font-size: 2.5rem;
  font-weight: 700;
  margin: 10px 0;
  text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.stat-hint {
  display: block;
  font-size: 0.85rem;
  opacity: 0.9;
  margin-top: 8px;
  font-style: italic;
}

.ranking-card {
  background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
  color: #1f2937;
  grid-column: span 2;
}

.ranking-list {
  list-style: none;
  padding: 0;
  margin: 15px 0 0 0;
}

.ranking-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 15px;
  background: rgba(255,255,255,0.5);
  border-radius: 8px;
  margin-bottom: 8px;
  font-weight: 500;
}

.ranking-position {
  font-weight: 700;
  font-size: 1.2rem;
  color: #3b82f6;
  min-width: 40px;
}

.ranking-name {
  flex: 1;
  padding: 0 15px;
}

.ranking-value {
  font-weight: 700;
  color: #10b981;
}

/* Modal de Rankings */
.modal-ranking {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
}

.modal-ranking-content {
  background: white;
  padding: 30px;
  border-radius: 12px;
  max-width: 90%;
  max-height: 90%;
  overflow-y: auto;
  box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1);
}

.modal-ranking-content h2 {
  margin-top: 0;
  color: #1f2937;
}

.ranking-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
}

.ranking-table th {
  background: #f3f4f6;
  padding: 12px;
  text-align: left;
  font-weight: 600;
  color: #374151;
  border-bottom: 2px solid #d1d5db;
}

.ranking-table td {
  padding: 12px;
  border-bottom: 1px solid #e5e7eb;
}

.ranking-table tr:hover {
  background: #f9fafb;
}

.ranking-table tr.alerta {
  background: #fef3c7;
}

.ranking-table tr.critico {
  background: #fee2e2;
}

/* Colaboradores com cadastro pendente */
.cadastro-pendente {
  border-left: 4px solid #f59e0b;
  background: #fffbeb;
}

.badge-pendente {
  display: inline-block;
  padding: 4px 8px;
  background: #f59e0b;
  color: white;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-left: 8px;
}

/* Responsivo */
@media (max-width: 768px) {
  .epi-linha {
    flex-direction: column;
    align-items: stretch;
  }
  
  .epi-col {
    width: 100%;
  }
  
  .epi-col.epi-acoes {
    flex-direction: column;
    width: 100%;
  }
  
  .ranking-card {
    grid-column: span 1;
  }
  
  .estatisticas-container {
    grid-template-columns: 1fr;
  }
}

/* ==============================================
   BOTÃO E CONSOLE DE DEBUG NA TELA DE LOGIN
   ============================================== */
.btn-console-login {
  width: 100%;
  padding: 12px;
  margin-top: 15px;
  background: #6b7280;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-console-login:hover {
  background: #4b5563;
  transform: translateY(-2px);
}

#consoleViewerLogin {
  font-family: 'Courier New', monospace;
  line-height: 1.6;
}

#consoleOutputLogin {
  max-height: 250px;
  overflow-y: auto;
}

#consoleOutputLogin::-webkit-scrollbar {
  width: 8px;
}

#consoleOutputLogin::-webkit-scrollbar-track {
  background: #374151;
}

#consoleOutputLogin::-webkit-scrollbar-thumb {
  background: #60a5fa;
  border-radius: 4px;
}

/* ==============================================
   DASHBOARD DE SOLICITAÇÕES DE COMPRA
   ============================================== */

/* Header com Estatísticas */
.solicitacoes-header {
  margin-bottom: 30px;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.stat-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}

.stat-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.stat-success {
  background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
  color: white;
}

.stat-warning {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: white;
}

.stat-info {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  color: white;
}

.stat-icon {
  font-size: 2.5rem;
  opacity: 0.9;
}

.stat-content {
  flex: 1;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 5px;
}

.stat-label {
  font-size: 0.9rem;
  opacity: 0.9;
  font-weight: 500;
}

.import-info {
  text-align: center;
  padding: 15px;
  background: #f8fafc;
  border-radius: 8px;
  color: #64748b;
  font-size: 0.9rem;
}

/* Filtros */
.solicitacoes-filtros {
  background: white;
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 30px;
  display: flex;
  gap: 20px;
  align-items: end;
  flex-wrap: wrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.filtro-grupo {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-width: 200px;
}

.filtro-grupo label {
  font-weight: 600;
  color: #475569;
  font-size: 0.9rem;
}

.filtro-select {
  padding: 10px 15px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s;
  background: white;
}

.filtro-select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn-filtro {
  padding: 10px 20px;
  background: #f59e0b;
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  white-space: nowrap;
}

.btn-filtro:hover {
  background: #d97706;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(245, 158, 11, 0.3);
}

/* Rankings Container */
.rankings-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 30px;
  margin-bottom: 30px;
}

.ranking-section {
  background: white;
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.ranking-section h3 {
  margin: 0 0 20px 0;
  color: #1e293b;
  font-size: 1.3rem;
  padding-bottom: 15px;
  border-bottom: 3px solid #667eea;
}

.ranking-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ranking-card {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.ranking-card:hover {
  transform: translateX(10px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-color: #667eea;
  background: linear-gradient(135deg, #eef2ff 0%, #dbeafe 100%);
}

.ranking-position {
  font-size: 1.5rem;
  font-weight: 700;
  color: #667eea;
  min-width: 45px;
  text-align: center;
  background: white;
  border-radius: 8px;
  padding: 8px 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.ranking-info {
  flex: 1;
}

.ranking-nome {
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 8px;
  font-size: 1.05rem;
}

.ranking-stats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.stat-badge {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

.stat-badge.stat-primary {
  background: #dbeafe;
  color: #1e40af;
}

.stat-badge.stat-success {
  background: #d1fae5;
  color: #065f46;
}

.stat-badge.stat-info {
  background: #e0e7ff;
  color: #4338ca;
}

.stat-badge.stat-warning {
  background: #fef3c7;
  color: #92400e;
}

.ranking-arrow {
  font-size: 1.5rem;
  color: #667eea;
  transition: transform 0.3s;
}

.ranking-card:hover .ranking-arrow {
  transform: translateX(5px);
}

/* Detalhes Area */
.detalhes-area {
  background: white;
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.detalhes-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 25px;
  padding-bottom: 20px;
  border-bottom: 3px solid #667eea;
}

.btn-voltar {
  padding: 10px 20px;
  background: #64748b;
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-voltar:hover {
  background: #475569;
  transform: translateX(-5px);
}

.detalhes-header h2 {
  margin: 0;
  flex: 1;
  color: #1e293b;
}

/* Lista de Solicitações */
.solicitacoes-lista {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 20px;
}

.sc-card {
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.sc-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
  border-color: #667eea;
}

.sc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 2px solid #f1f5f9;
}

.sc-numero {
  font-size: 1.2rem;
  font-weight: 700;
  color: #1e293b;
}

.sc-status {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

.status-autorizada {
  background: #d1fae5;
  color: #065f46;
}

.status-pendente {
  background: #fef3c7;
  color: #92400e;
}

.sc-info {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 15px;
}

.info-item {
  display: flex;
  gap: 8px;
  font-size: 0.9rem;
}

.info-label {
  font-weight: 600;
  color: #64748b;
  min-width: 100px;
}

.sc-stats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Detalhes Completos da SC */
.sc-detalhes-completo {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.sc-info-geral {
  background: #f8fafc;
  padding: 20px;
  border-radius: 12px;
  border: 2px solid #e2e8f0;
}

.info-row {
  display: flex;
  gap: 20px;
  margin-bottom: 15px;
}

.info-row:last-child {
  margin-bottom: 0;
}

.info-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.info-label {
  font-weight: 600;
  color: #64748b;
  font-size: 0.9rem;
}

.info-value {
  font-weight: 500;
  color: #1e293b;
  font-size: 1rem;
}

.status-badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.9rem;
}

.status-badge.status-autorizada {
  background: #d1fae5;
  color: #065f46;
}

.status-badge.status-pendente {
  background: #fef3c7;
  color: #92400e;
}

/* Tabela de Itens */
.sc-itens-tabela h3 {
  margin: 0 0 15px 0;
  color: #1e293b;
}

.tabela-itens {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.tabela-itens thead {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.tabela-itens th {
  padding: 15px;
  text-align: left;
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tabela-itens td {
  padding: 12px 15px;
  border-bottom: 1px solid #e2e8f0;
}

.tabela-itens tbody tr {
  transition: background 0.2s;
}

.tabela-itens tbody tr:hover {
  background: #f8fafc;
}

.item-insumo {
  font-weight: 500;
  color: #1e293b;
}

.item-qtd {
  text-align: right;
  font-weight: 600;
  color: #475569;
}

.status-badge-small {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}

.status-atendido {
  background: #d1fae5;
  color: #065f46;
}

.status-aguardando {
  background: #fef3c7;
  color: #92400e;
}

.tabela-itens tfoot {
  background: #f8fafc;
  font-weight: 700;
}

.total-row td {
  padding: 15px;
  border-top: 2px solid #667eea;
  color: #1e293b;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #94a3b8;
}

.empty-state svg {
  margin-bottom: 20px;
  opacity: 0.3;
}

.empty-state h3 {
  margin: 0 0 10px 0;
  color: #64748b;
}

.empty-state p {
  margin: 0;
  font-size: 0.95rem;
}

/* Loading Overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.loading-spinner {
  background: white;
  padding: 40px;
  border-radius: 12px;
  text-align: center;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 5px solid #f3f4f6;
  border-top-color: #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-spinner p {
  margin: 0;
  color: #475569;
  font-weight: 600;
}

/* Notifications */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 15px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  font-weight: 600;
  transform: translateX(400px);
  transition: transform 0.3s ease;
  z-index: 10000;
}

.notification.show {
  transform: translateX(0);
}

.notification-success {
  background: #d1fae5;
  color: #065f46;
  border-left: 4px solid #10b981;
}

.notification-error {
  background: #fee2e2;
  color: #991b1b;
  border-left: 4px solid #ef4444;
}

.notification-info {
  background: #dbeafe;
  color: #1e40af;
  border-left: 4px solid #3b82f6;
}

/* Responsividade */
@media (max-width: 1024px) {
  .rankings-container {
    grid-template-columns: 1fr;
  }
  
  .solicitacoes-lista {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .stats-row {
    grid-template-columns: 1fr;
  }
  
  .solicitacoes-filtros {
    flex-direction: column;
  }
  
  .filtro-grupo {
    width: 100%;
  }
  
  .info-row {
    flex-direction: column;
    gap: 10px;
  }
  
  .tabela-itens {
    font-size: 0.85rem;
  }
  
  .tabela-itens th,
  .tabela-itens td {
    padding: 8px 10px;
  }
  
  .detalhes-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .btn-voltar {
    width: 100%;
  }
}

/* ==========================================
   RANKINGS EM GRID - COMPACTO E MODERNO
   ========================================== */
.rankings-container-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 20px;
}

.ranking-section h3 {
  margin: 0 0 15px 0;
  font-size: 1.1rem;
  color: #1f2937;
  font-weight: 600;
}

.ranking-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 8px;
  max-height: 550px;
  overflow-y: auto;
  padding: 5px;
}

/* Card individual do ranking */
.rank-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: linear-gradient(135deg, #fff 0%, #f9fafb 100%);
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 52px;
}

.rank-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
  border-color: #3b82f6;
  background: linear-gradient(135deg, #fff 0%, #eff6ff 100%);
}

/* Número do ranking */
.rank-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  border-radius: 7px;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

/* Informações do ranking */
.rank-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.rank-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: #1f2937;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.rank-stats {
  display: flex;
  gap: 5px;
  align-items: center;
}

/* Badges mini */
.mini-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
  line-height: 1;
}

.badge-blue {
  background: #dbeafe;
  color: #1e40af;
}

.badge-green {
  background: #d1fae5;
  color: #065f46;
}

.badge-orange {
  background: #fed7aa;
  color: #92400e;
}

/* Seta indicadora */
.rank-arrow {
  color: #9ca3af;
  font-size: 1.1rem;
  flex-shrink: 0;
  transition: all 0.2s ease;
  font-weight: bold;
}

.rank-card:hover .rank-arrow {
  transform: translateX(3px);
  color: #3b82f6;
}

/* Scroll customizado */
.ranking-grid::-webkit-scrollbar {
  width: 6px;
}

.ranking-grid::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 3px;
}

.ranking-grid::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

.ranking-grid::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Botão de Limpar Dados */
.btn-danger-small {
  padding: 8px 16px;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
}

.btn-danger-small:hover {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  box-shadow: 0 4px 8px rgba(239, 68, 68, 0.4);
  transform: translateY(-1px);
}

.btn-danger-small:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(239, 68, 68, 0.3);
}

/* Responsividade dos rankings */
@media (max-width: 1400px) {
  .ranking-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }
}

@media (max-width: 1200px) {
  .ranking-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
}

@media (max-width: 1024px) {
  .rankings-container-grid {
    grid-template-columns: 1fr;
  }
  
  .ranking-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    max-height: 400px;
  }
}

@media (max-width: 768px) {
  .ranking-grid {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  
  .rank-card {
    padding: 8px 10px;
    min-height: 48px;
  }
  
  .rank-name {
    font-size: 0.85rem;
  }
}

