/* Central de Documentos e Envio ao Paciente */
.nes-central-envio {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 200px);
  max-height: calc(100vh - 120px);
}

.nes-central-envio-head {
  flex-shrink: 0;
  padding: var(--space-4) 0 var(--space-3);
  border-bottom: 1px solid var(--border-default, #e2e8f0);
}

.nes-central-envio-head h2 {
  margin: 0 0 4px;
  font-family: var(--font-display, 'Sora', sans-serif);
  font-size: var(--text-lg, 1.125rem);
  color: var(--navy-800, #0f2f3f);
}

.nes-central-envio-head p {
  margin: 0;
  font-size: var(--text-sm, 0.875rem);
  color: #64748b;
}

.nes-central-envio-toolbar {
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--border-default, #e2e8f0);
}

.nes-central-envio-filters {
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-bottom: var(--space-3);
}

.nes-central-envio-filters .btn.active {
  background: var(--navy-700, #0f4c66);
  color: #fff;
  border-color: var(--navy-700, #0f4c66);
}

.nes-central-envio-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: var(--space-3) 0;
  -webkit-overflow-scrolling: touch;
}

.nes-central-doc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.nes-central-doc-table th,
.nes-central-doc-table td {
  border: 1px solid #e2e8f0;
  padding: 8px 10px;
  text-align: left;
  vertical-align: middle;
}

.nes-central-doc-table th {
  background: #f8fafc;
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 1;
}

.nes-central-doc-table tr:hover td {
  background: #f8fafc;
}

.nes-central-status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
}

.nes-central-status--ok { background: #dcfce7; color: #166534; }
.nes-central-status--pend { background: #fef9c3; color: #854d0e; }
.nes-central-status--vazio { background: #f1f5f9; color: #64748b; }

.nes-central-envio-footer {
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-3) 0;
  border-top: 1px solid var(--border-default, #e2e8f0);
  background: var(--bg-elevated, #fff);
  position: sticky;
  bottom: 0;
  z-index: 2;
}

.nes-central-envio-footer .left-actions,
.nes-central-envio-footer .right-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.nes-central-preview {
  max-height: 70vh;
  overflow-y: auto;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  font-size: 0.85rem;
}

.nes-central-email-form label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  margin: 8px 0 4px;
}

.nes-central-email-form input,
.nes-central-email-form textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 8px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 0.85rem;
}

@media (max-width: 768px) {
  .nes-central-doc-table { font-size: 0.75rem; }
  .nes-central-envio-footer { flex-direction: column; align-items: stretch; }
  .nes-central-envio-footer .left-actions,
  .nes-central-envio-footer .right-actions { width: 100%; }
  .nes-central-envio-footer .btn { flex: 1; }
}
