/* main.css - esqueleto simples */
:root {
    --primary-color: #4f46e5;
    --primary-color-dark: #3730a3;
    --secondary-color: #10b981;
    --background-light: #f3f4f6;
    --background-white: #ffffff;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);

    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;

    --border-radius: 8px;
    --transition-speed: 0.3s;
}
body { margin:0; font-family: Arial, sans-serif; color:#222; background:#f5f6fa; }
.header, .footer { background:#1f2937; color:#fff; padding:10px 20px; display:flex; justify-content:space-between; align-items:center; }
.sidebar { background:#111827; min-width:200px; color:#cbd5e1; padding:15px; }
.sidebar a { color:#cbd5e1; text-decoration:none; display:block; margin:6px 0; }
.sidebar a:hover { color:#fff; }
.layout .body { display:flex; min-height: calc(100vh - 100px); }
.content { flex:1; padding:25px; background:#fff; }
.auth { display:flex; align-items:center; justify-content:center; min-height:100vh; background:#0f172a; }
.auth-card { background:#fff; padding:30px; border-radius:8px; width:320px; box-shadow:0 4px 14px rgba(0,0,0,.1); }
.auth-card h2 { margin-top:0; }
label { display:block; margin-bottom:12px; font-size:14px; }
input, select { width:100%; padding:8px; box-sizing:border-box; margin-top:4px; }
button { background:#2563eb; color:#fff; border:none; padding:10px 18px; cursor:pointer; border-radius:4px; }
button:hover { background:#1d4ed8; }
a.button { background:#2563eb; color:#fff; padding:8px 12px; border-radius:4px; text-decoration:none; }
a.button:hover { background:#1d4ed8; }
.table, .tabela { width:100%; border-collapse:collapse; margin-top:15px; }
.tabela th, .tabela td { border:1px solid #e2e8f0; padding:8px; text-align:left; font-size:14px; }
.toolbar { display:flex; justify-content:space-between; align-items:center; }
.flash { padding:10px; background:#e2e8f0; margin-bottom:12px; border-radius:4px; }
.flash.success { background:#d1fae5; }
.flash.error { background:#fee2e2; }
.grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); gap:12px; }
.inline { display:inline; margin-left:12px; }
.error { color:#b91c1c; font-size:12px; }
.info { color:#0369a1; font-size:12px; }
.success { color:#15803d; font-size:12px; }
.actions { margin-top:16px; display:flex; gap:10px; }
/* Estilos para campos de formulário inválidos */

input.is-invalid, select.is-invalid {
    border: 2px solid #b91c1c;
}
/* Melhorias na Sidebar */
.sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar li a {
    padding: 10px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background-color 0.3s ease;
}

.sidebar li a:hover {
    background-color: #1f2937;
    border-radius: 4px;
}

.sidebar .submenu {
    padding-left: 15px;
    margin-top: 5px;
}

.sidebar .submenu a {
    padding: 8px 10px;
}

.arrow-icon {
    font-size: 10px;
    transform: rotate(90deg); /* Faz a seta apontar para baixo */
    transition: transform 0.3s ease;
}

/* Melhorias no Header */
.header {
    background-color: #111827; /* Mesma cor da sidebar para uniformidade */
}
.card {
    background-color: var(--background-white);
    border-radius: var(--border-radius);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

.card-icon {
    background-color: var(--primary-color);
    color: var(--background-white);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.card-content {
    display: flex;
    flex-direction: column;
}

.card-label {
    color: var(--text-light);
    font-size: 14px;
}

.card-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
}
.performance-section {
    background-color: var(--background-white);
    padding: var(--spacing-lg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
}

.performance-section h3 {
    margin-bottom: var(--spacing-md);
}
/* Estilos para alertas */
.alerta-box {
  width: 350px;
  min-width: 350px;
  max-width: 350px;
  box-sizing: border-box;
  padding: 16px;
  margin-bottom: 12px;
  border-radius: 8px;
  word-break: break-word;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.severity-CRITICA { background: #ffdddd; border-left: 6px solid #d32f2f; }
.severity-ALTA { background: #fff3cd; border-left: 6px solid #fbc02d; }
.severity-MEDIA { background: #d1ecf1; border-left: 6px solid #1976d2; }
.severity-BAIXA { background: #e2e3e5; border-left: 6px solid #616161; }

/* Garante que todos os alertas fiquem alinhados */
.tabela .alerta-box { width: 100%; }
