body{margin:0;font-family:Inter,Arial;background:#f5f7fb;color:#1a1a1a;padding:20px}
.app-header{font-size:26px;font-weight:700;color:#005dff;margin-bottom:20px;text-align:center}
.card{background:#fff;border-radius:14px;padding:18px;box-shadow:0 3px 8px rgba(0,0,0,.08);margin-bottom:20px}
.card h2{margin-top:0;color:#003e9b;font-size:18px;font-weight:600}
.upload-row{display:flex;flex-wrap:wrap;gap:10px;align-items:center}
.status-pill{display:inline-flex;align-items:center;padding:6px 12px;border-radius:999px;font-size:13px;font-weight:600;background:#e2e8f0;color:#475569;min-height:34px}
.status-pill[data-status="info"]{background:#dbeafe;color:#1d4ed8}
.status-pill[data-status="ok"]{background:#dcfce7;color:#166534}
.status-pill[data-status="erro"]{background:#fee2e2;color:#b91c1c}
.status-pill[data-status="alert"]{background:#fef3c7;color:#92400e}
.status-pill[data-status="muted"]{background:#e2e8f0;color:#475569}
.card-header{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:12px}
.toggle-group{display:flex;gap:6px;background:#e8f0ff;padding:4px;border-radius:999px}
.toggle-button{background:transparent;color:#003e9b;font-weight:600;padding:6px 14px;border-radius:999px;border:none;cursor:pointer;font-size:13px;transition:.2s}
.toggle-button:hover{background:rgba(0,93,255,.12)}
.toggle-button.ativo{background:#005dff;color:#fff;box-shadow:0 4px 10px rgba(0,93,255,.3)}
.grafico-hint{margin:0 0 10px;color:#475569;font-size:13px}
input[type="file"],input[type="date"],input[type="text"]{padding:8px 10px;border:1px solid #c8d4e6;border-radius:8px;font-size:14px;margin:6px 0}
button{padding:8px 14px;border-radius:8px;border:none;background:#005dff;color:white;font-weight:600;cursor:pointer;transition:.2s}
button:hover{background:#0046c9}
table{width:100%;border-collapse:collapse;margin-top:12px}
.tabela-wrapper{max-height:420px;overflow-y:auto;border:1px solid #e5e7eb;border-radius:12px;margin-top:12px;background:#fff}
.tabela-wrapper table{margin-top:0}
.tabela-wrapper thead th{position:sticky;top:0;z-index:1}
th,td{padding:10px;border-bottom:1px solid #e5e7eb;font-size:14px}
th{background:#e8f0ff;cursor:pointer;color:#003e9b;text-align:left}
th.sort-asc::after,
th.sort-desc::after{
  content:"";
  display:inline-block;
  margin-left:6px;
  border:5px solid transparent;
}
th.sort-asc::after{border-bottom-color:#003e9b;transform:translateY(-2px)}
th.sort-desc::after{border-top-color:#003e9b;transform:translateY(2px)}
tr:hover{background:#f4f7ff}
#grafico{width:100%;height:320px}
.modal{position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,.45);display:none;justify-content:center;align-items:center;padding:20px;z-index:2000}
.modal-content{background:#fff;padding:20px;border-radius:12px;max-width:520px;width:100%;max-height:80%;overflow:auto;box-shadow:0 6px 12px rgba(0,0,0,.2)}
#listaNovos{margin-top:10px;line-height:1.5;font-size:14px;color:#333;max-height:240px;overflow-y:auto;border:1px solid #e5e7eb;border-radius:10px;padding:10px;background:#f9fbff}
#armazenamentoInfo{font-size:14px;color:#444;margin-top:8px;font-weight:500}
.linha-selecionada {
  background:#e0f2ff !important;
}

.modal-header {
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
  margin-bottom:12px;
}

.modal-header h2 {
  margin:0 0 4px 0;
  font-size:18px;
  color:#0f172a;
}

.modal-header p {
  margin:0;
  font-size:13px;
  color:#64748b;
}

.modal-close {
  border:none;
  background:transparent;
  font-size:22px;
  line-height:1;
  cursor:pointer;
  color:#64748b;
}

.modal-close:hover {
  color:#0f172a;
}

.exam-list {
  display:flex;
  flex-direction:column;
  gap:8px;
}

.exam-row {
  display:flex;
  justify-content:space-between;
  gap:12px;
  padding:10px 12px;
  border-radius:10px;
  background:#f8fafc;
  border:1px solid #e2e8f0;
}

.exam-info {
  flex:1;
}

.exam-desc {
  font-weight:600;
  margin-bottom:4px;
  color:#0f172a;
}

.exam-meta {
  font-size:12px;
  color:#64748b;
}

.exam-actions {
  display:flex;
  flex-direction:column;
  gap:6px;
  align-items:flex-end;
}

.chip {
  padding:4px 10px;
  border-radius:999px;
  border:none;
  background:#e0ecff;
  color:#1d4ed8;
  font-size:11px;
  font-weight:600;
  cursor:pointer;
  white-space:nowrap;
}

.chip:hover {
  background:#c7ddff;
}

.nomes-dia-actions{display:flex;justify-content:flex-end;margin-bottom:10px}
.nomes-dia-list{max-height:320px;overflow-y:auto;border:1px solid #e2e8f0;border-radius:10px;padding:12px;background:#f8fafc;display:flex;flex-direction:column;gap:6px;font-size:14px;color:#0f172a}
.nomes-dia-item{padding:4px 6px;border-bottom:1px solid #e2e8f0}
.nomes-dia-item:last-child{border-bottom:none}
