/* ================================================================
   ELGHIS · REFINAMIENTO DEL PROTOTIPO CLÍNICO
   Capa independiente sobre clinical-redesign.css.
   ================================================================ */

/* Ocultar los valores originales que la app seguirá actualizando. */

html.elghis-clinical-preview
#clinical-record-templates-count.elghis-metric-source-hidden,
html.elghis-clinical-preview
#clinical-record-fhir-status.elghis-metric-source-hidden {
  display: none !important;
}

/* Descripciones inferiores de las métricas. */

html.elghis-clinical-preview
#clinical-patient-view
.clinical-record-summary
.elghis-metric-description {
  display: block;
  margin-top: 9px;
  color: var(--ec-muted);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: normal;
  line-height: 1.35;
  text-transform: none;
}

/* Valores calculados de notas y progreso. */

html.elghis-clinical-preview
#clinical-patient-view
.clinical-record-summary
.elghis-calculated-metric {
  display: block;
  margin-top: 10px;
  color: var(--ec-text);
  font-size: 31px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.045em;
}

/* Estado visual del progreso. */

html.elghis-clinical-preview
.elghis-progress-metric {
  position: relative;
  overflow: hidden;
}

html.elghis-clinical-preview
.elghis-progress-metric::after {
  content: "";
  position: absolute;
  right: -32px;
  bottom: -42px;
  width: 115px;
  height: 115px;
  border-radius: 50%;
  background: rgba(34, 164, 172, 0.07);
  pointer-events: none;
}

/* La barra interna queda con buscador y actualización. */

html.elghis-clinical-preview
.elghis-clinical-toolbar {
  grid-template-columns: minmax(0, 1fr) auto;
}

/* Protección por si todavía apareciera el botón interno duplicado. */

html.elghis-clinical-preview
.elghis-toolbar-button[
  aria-label="Volver a pacientes"
] {
  display: none !important;
}

/* Dar un poco más de presencia a las métricas. */

html.elghis-clinical-preview
#clinical-patient-view
.clinical-record-summary article {
  position: relative;
  overflow: hidden;
}

html.elghis-clinical-preview
#clinical-patient-view
.clinical-record-summary article:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(15, 62, 84, 0.1);
}

html.elghis-clinical-preview
#clinical-patient-view
.clinical-record-summary article {
  transition:
    transform 160ms ease,
    box-shadow 160ms ease;
}

@media (max-width: 760px) {
  html.elghis-clinical-preview
  .elghis-clinical-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 48px;
  }

  html.elghis-clinical-preview
  .elghis-toolbar-button:last-child {
    display: grid !important;
  }
}
