/* =====================================================
   PERFIL DEL PACIENTE — cabecera premium
   ===================================================== */
.pf-hero { display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; background: linear-gradient(135deg, #ffffff 0%, #f7fbfb 55%, #faf6fc 100%); border: 1px solid #eaeef2; border-radius: 22px; padding: 22px 26px; box-shadow: 0 1px 2px rgba(16, 24, 40, .04); margin-bottom: 14px; }
.pf-hero-main { display: flex; align-items: center; gap: 18px; min-width: 0; flex: 1; }
.pf-avatar { width: 68px; height: 68px; border-radius: 22px; background: linear-gradient(135deg, var(--morado), var(--morado-oscuro)); color: #fff; font-size: 24px; font-weight: 900; display: flex; align-items: center; justify-content: center; letter-spacing: 1px; flex-shrink: 0; box-shadow: 0 10px 22px rgba(107, 62, 153, .28); }
.pf-identidad { min-width: 0; }
.pf-nombre-fila { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pf-nombre-fila h1 { font-size: 27px; font-weight: 900; color: #1e293b; letter-spacing: -.5px; margin: 0; text-transform: capitalize; line-height: 1.15; }
.pf-estado { padding: 5px 26px 5px 12px; border-radius: 99px; font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: .6px; border: 1px solid transparent; cursor: pointer; appearance: none; -webkit-appearance: none; font-family: inherit; background-image: url('data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 24 24\' fill=\'%23555\'><path d=\'M7 10l5 5 5-5z\'/></svg>'); background-repeat: no-repeat; background-position: right 6px center; background-size: 14px; }
.pf-alerta-fin { padding: 5px 12px; border-radius: 99px; font-size: 11.5px; font-weight: 900; cursor: pointer; box-shadow: none !important; }
.pf-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.pf-chip { display: inline-flex; align-items: center; gap: 7px; background: #fff; border: 1px solid #e8edf2; border-radius: 99px; padding: 5px 12px; font-size: 12.5px; font-weight: 700; color: #475569; text-decoration: none; }
.pf-chip i { color: var(--turquesa); font-size: 12px; }
.pf-chip b { color: #1e293b; font-weight: 800; }
a.pf-chip:hover { border-color: #25d366; color: #15803d; }
a.pf-chip:hover i { color: #25d366; }

.pf-control { display: flex; flex-direction: column; gap: 4px; background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; padding: 8px 14px; min-width: 250px; max-width: 100%; }
.pf-control label { font-size: 10.5px; font-weight: 900; letter-spacing: .6px; text-transform: uppercase; color: #94a3b8; }
.pf-control label i { margin-right: 4px; }
.pf-control select { border: 0; outline: none; background: transparent; font-weight: 800; font-size: 14px; color: var(--turquesa); cursor: pointer; font-family: inherit; max-width: 100%; }

.pf-barra { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.pf-grupo { display: inline-flex; gap: 6px; padding: 4px; background: #fff; border: 1px solid #eaeef2; border-radius: 14px; flex-wrap: wrap; }
.pf-grupo .fz-btn { background: transparent; border-color: transparent; padding: 9px 14px; }
.pf-grupo .fz-btn:hover:not(:disabled) { background: #f1f5f9; }
.pf-guardar { margin-left: auto; padding: 13px 24px; font-size: 15px; }

.pf-anamnesis { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 12px; margin-bottom: 18px; }
.pf-tile { background: #fff; border: 1px solid #eaeef2; border-radius: 16px; padding: 13px 16px; min-width: 0; }
.pf-tile-cab { font-size: 11px; font-weight: 900; letter-spacing: .6px; text-transform: uppercase; color: #94a3b8; display: flex; align-items: center; gap: 7px; margin-bottom: 6px; }
.pf-tile-cab i { color: var(--turquesa); }
.pf-tile-texto { font-size: 13.5px; font-weight: 700; color: #334155; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }
.pf-tile-texto.abierto { display: block; -webkit-line-clamp: unset; }
.pf-mas { background: none; border: 0; padding: 0; margin-top: 4px; color: var(--morado); font-weight: 800; font-size: 12px; cursor: pointer; font-family: inherit; }
.pf-tile-alerta { border-color: #fecaca; background: linear-gradient(180deg, #fffafa, #fff); }
.pf-tile-alerta .pf-tile-cab, .pf-tile-alerta .pf-tile-cab i { color: #dc2626; }

@media (max-width: 1100px) { .pf-anamnesis { grid-template-columns: 1fr 1fr; } .pf-tile-ancho { grid-column: 1 / -1; } }
@media (max-width: 700px) {
    .pf-hero { padding: 16px; }
    .pf-hero-main { align-items: flex-start; gap: 12px; }
    .pf-avatar { width: 54px; height: 54px; font-size: 19px; border-radius: 17px; }
    .pf-nombre-fila h1 { font-size: 21px; }
    .pf-control { width: 100%; }
    .pf-guardar { margin-left: 0; width: 100%; }
    .pf-anamnesis { grid-template-columns: 1fr; }
}

/* ---------- Avisos de radicado (solo lectura / edición) ---------- */
.rd-banner { display: none; align-items: center; gap: 16px; flex-wrap: wrap; border-radius: 18px; padding: 16px 20px; margin-bottom: 18px; border: 1px solid; }
.rd-icono { width: 44px; height: 44px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.rd-texto { flex: 1; min-width: 240px; }
.rd-texto b { display: block; font-size: 15px; font-weight: 900; }
.rd-texto span { font-size: 13px; font-weight: 600; line-height: 1.45; display: block; margin-top: 2px; }
.rd-acciones { display: flex; gap: 8px; flex-wrap: wrap; }
.rd-lectura { background: linear-gradient(135deg, #fffaf0, #fff6e0); border-color: #fde4a8; }
.rd-lectura .rd-icono { background: #f59e0b; color: #fff; box-shadow: 0 8px 18px rgba(245, 158, 11, .3); }
.rd-lectura .rd-texto b { color: #92600a; } .rd-lectura .rd-texto span { color: #8a6a2a; }
.rd-edicion { background: linear-gradient(135deg, #f3fdf9, #eafaf3); border-color: #b9ead3; }
.rd-edicion .rd-icono { background: var(--turquesa); color: #fff; box-shadow: 0 8px 18px rgba(0, 168, 157, .28); }
.rd-edicion .rd-texto b { color: #0f766e; } .rd-edicion .rd-texto span { color: #3f7d70; }
