/* Historia clínica: línea de tiempo, panel flotante y hoja de visita (panel del estudio y cuenta de la clienta) */
.hv-lock { overflow: hidden; }
.hv-ov { position: fixed; inset: 0; z-index: 300; background: rgba(15,10,5,.55); display: flex; justify-content: flex-end; }
.hv-panel { background: var(--bg, #FBF8F2); color: var(--ink, #17130e); width: min(720px, 100%); height: 100%; display: flex; flex-direction: column; box-shadow: -12px 0 40px rgba(0,0,0,.25); animation: hvIn .22s ease-out; outline: none; }
@keyframes hvIn { from { transform: translateX(40px); opacity: .4; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .hv-panel { animation: none; } }
.hv-head { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line, #e6dccb); background: #fff; }
.hv-head h2 { font: 700 1.35rem Fraunces, Georgia, serif; margin: 0; }
.hv-head p { margin: 2px 0 0; font-size: .85rem; color: var(--muted, #6b6256); }
.hv-acts { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.hv-btn { font: 700 .8rem Manrope, system-ui, sans-serif; border: 1.5px solid #000; background: transparent; color: #000; border-radius: 999px; padding: 7px 14px; cursor: pointer; }
.hv-btn:hover { background: #000; color: #fff; }
.hv-btn.gold { background: linear-gradient(135deg, var(--gold-l, #EFD38A), var(--gold, #A68A55)); border-color: transparent; }
.hv-body { overflow: auto; padding: 18px 22px 60px; flex: 1; }
.hv-indice { display: flex; gap: 6px; flex-wrap: wrap; position: sticky; top: -18px; background: var(--bg, #FBF8F2); padding: 10px 0; margin: -10px 0 8px; z-index: 2; }
.hv-indice button { font: 600 .76rem Manrope, sans-serif; border: 1px solid var(--line, #e6dccb); background: #fff; border-radius: 999px; padding: 4px 11px; cursor: pointer; }
.hv-indice button.on { background: #000; color: #fff; border-color: #000; }
.hv-visita { background: #fff; border: 1px solid var(--line, #e6dccb); border-radius: 16px; padding: 18px 18px 8px; margin-bottom: 16px; scroll-margin-top: 56px; }
.hv-visita > header { display: flex; gap: 10px; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
.hv-visita h3 { font: 700 1.1rem Fraunces, Georgia, serif; margin: 0; }
.hv-visita h3::first-letter { text-transform: uppercase; }
.hv-visita header p { margin: 2px 0 0; font-size: .88rem; color: var(--muted, #6b6256); }
.hv-sec { margin: 0 0 14px; } .hv-sec h4 { font: 800 .7rem Manrope, sans-serif; letter-spacing: .09em; text-transform: uppercase; color: var(--gold, #A68A55); margin: 0 0 4px; }
.hv-sec p { margin: 0; } .hv-pre { white-space: pre-line; }
.hv-prod { margin: 0; padding-left: 18px; } .hv-prod small { color: var(--muted, #6b6256); }
.hv-rec { background: #F3ECDF; border-left: 4px solid var(--gold, #A68A55); border-radius: 10px; padding: 10px 14px; }
.hv-fotos { display: flex; flex-wrap: wrap; gap: 10px; }
.hv-fotos figure { margin: 0; width: calc(50% - 5px); max-width: 240px; }
.hv-fotos img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; background: #eee; display: block; cursor: zoom-in; border: 1px solid var(--line, #e6dccb); }
.hv-fotos figcaption { font-size: .78rem; color: var(--muted, #6b6256); margin-top: 3px; }
.hv-fallo img { opacity: .35; cursor: default; }
.hv-vacio { color: var(--muted, #6b6256); }
/* línea de tiempo */
.hv-linea { display: grid; gap: 10px; position: relative; padding-left: 18px; }
.hv-linea::before { content: ""; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 2px; background: var(--line, #e6dccb); }
.hv-card { position: relative; display: grid; gap: 2px; text-align: left; width: 100%; background: #fff; border: 1px solid var(--line, #e6dccb); border-radius: 14px; padding: 12px 14px; cursor: pointer; font: inherit; color: inherit; }
.hv-card:hover { border-color: var(--gold, #A68A55); box-shadow: 0 2px 12px rgba(166,138,85,.2); }
.hv-dot { position: absolute; left: -18px; top: 18px; width: 12px; height: 12px; border-radius: 50%; background: var(--gold, #A68A55); border: 2px solid var(--bg, #FBF8F2); }
.hv-card-t { font-weight: 800; } .hv-card-s { font-size: .82rem; color: var(--muted, #6b6256); } .hv-card-r { font-size: .88rem; }
.hv-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; } .hv-chips i { font-style: normal; font-size: .72rem; font-weight: 700; background: #F3ECDF; border-radius: 999px; padding: 2px 9px; } .hv-chips i.rec { background: #E1F2E6; color: #256b3a; }
/* formulario de visita */
.hv-form { display: grid; gap: 16px; } .hv-form label { display: grid; gap: 5px; font: 700 .74rem Manrope, sans-serif; letter-spacing: .05em; text-transform: uppercase; color: var(--muted, #6b6256); }
.hv-form input[type=text], .hv-form input[type=date], .hv-form select, .hv-form textarea { font: 500 .95rem Manrope, system-ui, sans-serif; padding: 10px 12px; border: 1.5px solid var(--line, #e6dccb); border-radius: 10px; background: #fff; width: 100%; text-transform: none; letter-spacing: 0; color: var(--ink, #17130e); }
.hv-form textarea { resize: vertical; min-height: 84px; }
.hv-form fieldset { border: 1px solid var(--line, #e6dccb); border-radius: 14px; padding: 12px 14px 14px; background: #fff; margin: 0; } .hv-form legend { font: 800 .72rem Manrope, sans-serif; letter-spacing: .09em; text-transform: uppercase; color: var(--gold, #A68A55); padding: 0 6px; }
.hv-prodrow { display: grid; grid-template-columns: 2fr 1.4fr 1.4fr auto; gap: 6px; margin-bottom: 6px; }
@media (max-width: 640px) { .hv-prodrow { grid-template-columns: 1fr 1fr; } .hv-prodrow input:first-child { grid-column: 1 / -1; } .hv-head { padding: 14px 16px; } .hv-body { padding: 14px 14px 60px; } }
.hv-chk { display: flex !important; align-items: center; gap: 8px; text-transform: none !important; letter-spacing: 0 !important; font-size: .92rem !important; color: var(--ink, #17130e) !important; } .hv-chk input { width: 18px; height: 18px; }
.hv-ayuda { font-size: .8rem; color: var(--muted, #6b6256); margin: 0; font-weight: 500; text-transform: none; letter-spacing: 0; }
/* impresión: solo el historial */
@media print { body.hv-lock > *:not(.hv-ov) { display: none !important; } .hv-ov { position: static; background: none; } .hv-panel { box-shadow: none; width: 100%; height: auto; animation: none; } .hv-body { overflow: visible; } .hv-acts, .hv-indice { display: none !important; } .hv-visita { break-inside: avoid; } }
