/* Central de Monitoramento de Segurança - Estilos Globais */

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.header {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  margin-bottom: 2rem;
  text-align: center;
}

.header h1 {
  font-size: 2rem;
  font-weight: bold;
  color: #1f2937;
  margin-bottom: 0.5rem;
}

.header .subtitle {
  color: #6b7280;
  font-size: 1.125rem;
}

.back-button {
  display: inline-block;
  margin-bottom: 1rem;
  color: #667eea;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s;
}

.back-button:hover {
  color: #764ba2;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.card {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
  text-align: center;
}

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

.card .icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 1rem;
}

.card h2 {
  font-size: 1.5rem;
  font-weight: bold;
  color: #1f2937;
  margin-bottom: 0.5rem;
}

.card p {
  color: #6b7280;
  font-size: 1rem;
}

/* Formulário */
.form-section {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  border-left: 4px solid #667eea;
}

.form-section h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #1f2937;
}

/* Loading */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255,255,255,.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
}

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

/* Badge de criticidade */
.badge-alta {
  background-color: #E63946;
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.875rem;
}

.badge-media {
  background-color: #F4A460;
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.875rem;
}

.badge-baixa {
  background-color: #2A9D8F;
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.875rem;
}

/* Drag and drop area */
.drop-zone {
  border: 2px dashed #cbd5e1;
  border-radius: 8px;
  padding: 2rem;
  text-align: center;
  transition: all 0.2s;
  cursor: pointer;
}

.drop-zone:hover,
.drop-zone.dragging {
  border-color: #667eea;
  background-color: #f8f9ff;
}

/* Abas */
.aba-btn {
  flex: 1;
  padding: 1rem 2rem;
  font-weight: 600;
  color: #6b7280;
  background: white;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  border-bottom: 3px solid transparent;
}

.aba-btn:hover {
  color: #667eea;
  background-color: #f9fafb;
}

.aba-btn.aba-ativa {
  color: #667eea;
  border-bottom-color: #667eea;
  background-color: #f9fafb;
}

/* Tabelas */
table {
  width: 100%;
  border-collapse: collapse;
}

table th {
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

table td,
table th {
  padding: 1rem 1.5rem;
  text-align: left;
}

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

/* Responsivo */
@media (max-width: 768px) {
  .container {
    padding: 1rem;
  }
  
  .header h1 {
    font-size: 1.5rem;
  }
  
  .cards {
    grid-template-columns: 1fr;
  }
  
  .aba-btn {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
  }
  
  table {
    font-size: 0.875rem;
  }
  
  table td,
  table th {
    padding: 0.75rem 1rem;
  }
}
