/* Escenas propias de ClidoHismed en /sistema. El resto (portada, ventanas, teléfono, animaciones) es sistema.css,
   copia del de ClidoLab. Igual que allá, todo se anima cuando sistema.js le pone .ver a la escena. */

/* ---------- Agenda ---------- */
.hm-agenda { display: grid; grid-template-columns: 44px 1fr; grid-auto-rows: 32px; gap: 4px 10px; }
.hm-hora { grid-column: 1; grid-row: var(--fila); font-size: 11px; color: #8592a3; align-self: start; line-height: 1; }
.hm-hueco { grid-column: 2; grid-row: var(--fila); border-top: 1px dashed #e4e6ea; }
.hm-cita {
    grid-column: 2; grid-row: var(--fila); z-index: 1; display: flex; align-items: center; gap: 8px; padding: 0 10px;
    border-radius: 8px; background: var(--p-claro); border-left: 4px solid var(--p); color: #2a2b66; font-size: 12px;
}
.hm-cita small { color: #8592a3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-mueve { background: var(--c1-claro); border-left-color: var(--c1); }
.cl .ver .hm-mueve[data-a] { animation: cl-subir .6s cubic-bezier(.2, .7, .3, 1) var(--d) both, hm-mover 1.1s 2.2s cubic-bezier(.5, 0, .3, 1) forwards; }
@keyframes hm-mover {
    0% { transform: none; box-shadow: none; }
    15% { transform: scale(1.04); box-shadow: 0 8px 20px rgba(0, 18, 106, .18); }
    85% { transform: translateY(108px) scale(1.04); box-shadow: 0 8px 20px rgba(0, 18, 106, .18); }
    100% { transform: translateY(108px); box-shadow: none; }
}
.ver .hm-destino { animation: hm-resaltar 1.2s 2.2s both; }
@keyframes hm-resaltar { 30%, 70% { background: var(--c1-claro); border-radius: 8px; } }

/* ---------- Citas en línea ---------- */
.cl-par .cl-app-item b { white-space: nowrap; }
.hm-horas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.hm-horas span { text-align: center; padding: 7px 0; border-radius: 10px; background: #fff; font-weight: 600; font-size: 12px; color: var(--c2); box-shadow: 0 2px 8px rgba(0, 0, 0, .04); }
.hm-horas .ocupada { color: #b4bac4; text-decoration: line-through; background: #eef0f4; box-shadow: none; }
.ver .hm-elegida { animation: hm-elegir .4s 1.7s both; }
@keyframes hm-elegir { 50% { transform: scale(1.12); } to { background: var(--c1); color: #fff; } }

/* ---------- Historia ---------- */
.hm-etiquetas { display: flex; flex-wrap: wrap; gap: 6px; }
.hm-etiquetas span { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 20px; background: #eef0f4; color: var(--tinta); }
.hm-etiquetas .hm-alergia { background: #ffe5e1; color: #e53c25; }
.hm-campo { border: 1px solid #eceef1; border-radius: 10px; padding: 10px 12px; }
.hm-campo-cab { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.hm-campo-cab .cl-chip { display: inline-flex; align-items: center; gap: 4px; }
.hm-texto { margin: 0; min-height: 60px; line-height: 1.5; }
.hm-consultas { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #8592a3; }

/* ---------- Signos vitales ---------- */
.hm-signos { grid-template-columns: repeat(3, 1fr); }
.hm-signo { display: grid; justify-items: center; gap: 2px; text-align: center; padding: 10px 6px; border: 1px solid #eceef1; border-radius: 10px; }
.hm-signo .bx { font-size: 20px; color: var(--c1); }
.hm-signo small { font-size: 10px; color: #8592a3; line-height: 1.2; }
.hm-signo .cl-valor { font-size: 18px; color: var(--c2); }
.hm-imc { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-radius: 10px; background: var(--c1-claro); color: var(--c2); font-weight: 600; }
.hm-imc b { font-size: 20px; }

/* ---------- Campos por especialidad ---------- */
.hm-dato { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid #eceef1; border-radius: 10px; }
.hm-dato > span { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.hm-dato b { color: var(--c2); white-space: nowrap; }

/* ---------- CIE-10 ---------- */
.hm-buscar { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border: 2px solid var(--p); border-radius: 8px; }
.hm-buscar .bx { color: #8592a3; }
.hm-escribe { display: inline-block; overflow: hidden; white-space: nowrap; max-width: 0; border-right: 2px solid var(--p); vertical-align: bottom; }
.ver .hm-escribe { animation: hm-escribir 1s .4s steps(12) forwards; }
@keyframes hm-escribir { to { max-width: 10em; } }
.hm-cie { padding: 8px 12px; border-radius: 8px; border: 1px solid #eceef1; }
.hm-cie b { color: var(--p); margin-right: 6px; }
.cl .ver .hm-elegido[data-a] { animation: cl-subir .6s cubic-bezier(.2, .7, .3, 1) var(--d) both, hm-marcar .4s 2.5s forwards; }
@keyframes hm-marcar { to { background: var(--p-claro); border-color: var(--p); } }

/* ---------- Receta ---------- */
.hm-receta td small { display: block; color: #8592a3; font-size: 11px; }

/* ---------- Órdenes ---------- */
.hm-orden { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid #eceef1; border-radius: 10px; }
.hm-orden-ico { font-size: 20px; color: var(--c1); background: var(--c1-claro); width: 34px; height: 34px; border-radius: 9px; }
.hm-orden div { display: grid; line-height: 1.3; }
.hm-orden small { color: #8592a3; }
.hm-orden .hm-listo { background: #e8fadf; color: #3e8f00; }
.ver .hm-orden .pend { animation: cl-fuera .3s 2.4s both; }
.ver .hm-orden .proc { animation: cl-dentro .3s 2.4s both; }
.hm-adjunto { background: #e9fbef; color: #12823b; }

/* ---------- Portal ---------- */
.hm-bajar { font-size: 20px; color: var(--c1); }

@media (max-width: 600px) {
    .hm-signos { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
    .hm-mueve { transform: translateY(108px); }
    .hm-escribe { max-width: none; border: 0; }
    .hm-elegida { background: var(--c1); color: #fff; }
    .hm-orden .pend { opacity: 0; }
    .hm-orden .proc { opacity: 1; }
}
