/* Carnet de perfil (compartido con Programa de Jóvenes) */
/* ============================================================
   REDISEÑO UI · Perfil del joven (cabecera clara con acento del color de la rama)
   Idea: la cabecera deja de ser un bloque oscuro de degradado y pasa a ser una "ficha"
   blanca con una franja del color de la rama; la información se ordena en casillas
   y las acciones tienen jerarquía (una principal, el resto secundarias).
   ============================================================ */
.profile-header-card.ux-prof{
  background:#fff !important;background-image:none !important;color:#0f172a;
  border-top:6px solid var(--rc,#0E2586);border-bottom:1px solid #e2e8f0;
  padding:26px 32px;gap:26px;align-items:flex-start;
}
.ux-prof .profile-pic-large{width:112px;height:112px;border:4px solid var(--rc,#0E2586);box-shadow:0 6px 16px rgba(15,23,42,.15)}
.ux-prof .profile-info h2{color:#0E2586;text-shadow:none;font-size:1.9rem;line-height:1.15;margin-bottom:8px}
.ux-prof .badge-rama{background:color-mix(in srgb,var(--rc,#0E2586) 12%,#fff);border:1px solid color-mix(in srgb,var(--rc,#0E2586) 45%,#fff);box-shadow:none;margin-bottom:14px;color:#1e293b}
.ux-prof .profile-info-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:10px;margin-top:0;align-items:start}
.ux-prof .profile-info-grid p{
  background:#f8fafc;border:1px solid #e2e8f0;border-radius:10px;color:#1e293b;text-shadow:none;
  padding:9px 12px;font-size:.86rem;font-weight:600;min-width:0;overflow-wrap:anywhere;flex-wrap:wrap;gap:4px 8px !important;
}
.ux-prof .profile-info-grid select{margin-left:0 !important}
.ux-prof .profile-info-grid p i{opacity:.9}
.ux-prof .profile-info-grid p[class*="red"]{background:#fef2f2;border-color:#fecaca;color:#991b1b}
.ux-prof .profile-info-grid select{border:1px solid #cbd5e1 !important;background:#fff !important;color:#0f172a}
.ux-prof .clickable-phone:hover{background:#eef2ff;border-color:#c7d2fe}
.ux-prof .profile-actions{flex-direction:column;gap:8px;min-width:190px}
.ux-prof .profile-actions .btn{
  justify-content:center;font-size:.85rem;padding:10px 14px !important;box-shadow:none !important;border-radius:10px;
  background:#fff !important;color:#0E2586 !important;border:1.5px solid #cbd5e1 !important;
}
.ux-prof .profile-actions .btn:hover{background:#f1f5f9 !important;border-color:#0E2586 !important}
/* acción principal: Edición general */
.ux-prof .profile-actions .btn:nth-child(2){background:#0E2586 !important;color:#fff !important;border-color:#0E2586 !important}
.ux-prof .profile-actions .btn:nth-child(2):hover{background:#001558 !important}
/* estado Activo/Inactivo como etiqueta de estado */
.ux-prof .profile-actions .btn:last-child{background:#ecfdf5 !important;color:#065f46 !important;border-color:#a7f3d0 !important}
.ux-prof .profile-actions .btn:last-child[class*=" bg-red-600 "]{background:#fef2f2 !important;color:#991b1b !important;border-color:#fecaca !important}
/* lista de jóvenes: sin "saltito" al pasar el mouse y con barra del color de la rama al seleccionar */
.adult-list-item:hover{padding-left:20px !important;background:#f1f5f9}
.adult-list-item.active{padding-left:15px !important}
@media(max-width:900px){
  .profile-header-card.ux-prof{padding:20px 16px;align-items:center}
  .ux-prof .profile-info-grid{grid-template-columns:1fr;text-align:left}
  .ux-prof .profile-actions{flex-direction:row;flex-wrap:wrap;min-width:0;width:100%}
  .ux-prof .profile-actions .btn{flex:1 1 calc(50% - 8px);min-width:130px}
}
.ux-prof .profile-info-grid p{display:block !important;line-height:1.5}
.ux-prof .profile-info-grid p>i{margin-right:7px}
.ux-prof .profile-info-grid p select{display:inline-block;margin-top:4px}

/* REDISEÑO UI v2 · Perfil del joven: alerta médica, acción principal y menú "Más acciones" */
.ux-prof .pa-alert{grid-column:1/-1;display:flex;gap:12px;align-items:flex-start;margin-top:14px;padding:12px 14px;border-radius:12px;background:#fef2f2;border:1px solid #fecaca;border-left:5px solid #dc2626;color:#7f1d1d}
.ux-prof .pa-alert>i{font-size:1.2rem;color:#dc2626;margin-top:2px}
.ux-prof .pa-alert b{display:block;font-size:.72rem;text-transform:uppercase;letter-spacing:.05em}
.ux-prof .pa-alert span{font-size:.92rem;font-weight:600}
.ux-prof .pa-ok{margin-top:12px;font-size:.8rem;color:#047857;font-weight:600}
.ux-prof .profile-actions{display:flex;flex-direction:column;gap:10px;align-items:stretch;position:relative}
.ux-prof .pa-primary{background:#1e3a5f !important;color:#fff !important;border:0 !important;border-radius:10px;padding:12px 18px !important;font-weight:700;box-shadow:0 4px 12px rgba(30,58,95,.25)}
.ux-prof .pa-primary:hover{filter:brightness(1.12)}
.pa-more{position:relative}
.pa-more>summary{list-style:none;cursor:pointer;background:#fff !important;color:#334155 !important;border:1.5px solid #cbd5e1 !important;border-radius:10px;padding:10px 18px;font-weight:600;text-align:center}
.pa-more>summary::-webkit-details-marker{display:none}
.pa-more[open]>summary{border-color:#1e3a5f !important;color:#1e3a5f !important}
.pa-menu{position:absolute;right:0;top:calc(100% + 6px);min-width:100%;width:max-content;z-index:30;background:#fff;border:1px solid #e2e8f0;border-radius:12px;box-shadow:0 12px 30px rgba(15,23,42,.18);padding:6px;display:flex;flex-direction:column}
.pa-item{display:flex;gap:10px;align-items:center;width:100%;text-align:left;padding:10px 12px;border:0;background:transparent;border-radius:8px;font-size:.88rem;font-weight:600;color:#334155;cursor:pointer}
.pa-item:hover{background:#f1f5f9}
.pa-item.pa-on{color:#047857}.pa-item.pa-off{color:#b91c1c}
@media(max-width:900px){.pa-menu{left:0;right:auto;width:100%}}
.ux-prof .profile-actions .btn.pa-primary{background:#0E2586 !important;color:#fff !important;border-color:#0E2586 !important;flex:none;width:100%;justify-content:center}
.ux-prof .profile-actions .btn.pa-primary:hover{background:#001558 !important}
.ux-prof .profile-actions .pa-more{flex:none;width:100%}
.ux-prof .profile-actions .btn.pa-sum{width:100%;display:flex;justify-content:center;gap:8px;min-width:0}
.ux-prof .profile-actions .btn.pa-sum:hover{background:#f1f5f9 !important}
.ux-prof .profile-info-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.ux-prof .profile-info-grid p:nth-child(3){grid-column:1/-1}
.ux-prof .pa-alert{text-align:left}.ux-prof .pa-alert>div{flex:1;min-width:0}
@media(max-width:900px){.ux-prof .profile-info-grid{grid-template-columns:1fr}.ux-prof .profile-actions{flex-direction:column}}

/* REDISEÑO UI v3 · Color de rama, pestañas tipo "pastilla" y contenido en tarjetas */
.ux-prof{background:linear-gradient(180deg,color-mix(in srgb,var(--rc) 20%,#fff) 0%,#fff 75%) !important}
.ux-prof .profile-info-grid p{background:#fff;border-color:color-mix(in srgb,var(--rc) 22%,#e2e8f0)}
.ux-prof .pa-primary,.ux-prof .profile-actions .btn.pa-primary{background:var(--rc) !important;border-color:var(--rc) !important;box-shadow:0 4px 12px color-mix(in srgb,var(--rc) 35%,transparent)}
.ux-prof .profile-actions .btn.pa-primary:hover{filter:brightness(.9)}
.ux-prof .badge-rama{font-weight:700}

/* Pestañas */
.profile-tabs{background:#fff;padding:10px 20px;gap:8px;border-bottom:1px solid #e2e8f0}
.profile-tab{border:1.5px solid transparent !important;border-radius:999px;padding:9px 16px !important;font-size:.8rem !important;letter-spacing:0;color:#475569;background:#f1f5f9;white-space:nowrap;flex:0 0 auto}
.profile-tab:hover{background:#e2e8f0;color:#0f172a}
.profile-tab.active{background:var(--rc,#0E2586);color:#fff !important;box-shadow:0 3px 10px color-mix(in srgb,var(--rc,#0E2586) 35%,transparent)}
.profile-tab.active i{color:#fff}

/* Contenido en tarjetas */
.profile-content-area{padding:24px 32px;background:#f1f5f9}
.p-tab-pane>.section-title{font-size:1.1rem;border-bottom:0;padding-bottom:0;margin-bottom:14px;position:relative;padding-left:14px}
.p-tab-pane>.section-title::before{content:'';position:absolute;left:0;top:3px;bottom:3px;width:5px;border-radius:3px;background:var(--rc,#0E2586)}
.p-tab-pane>.progression-stepper{background:#fff;border:1px solid #e2e8f0;box-shadow:0 1px 3px rgba(15,23,42,.06)}
.p-tab-pane>div[class*="bg-white"],.p-tab-pane .card{border-radius:14px}
@media(max-width:900px){.profile-content-area{padding:16px 14px}.profile-tabs{padding:8px 12px}}
.profile-header-card.ux-prof{background:linear-gradient(180deg,color-mix(in srgb,var(--rc) 20%,#fff) 0%,#fff 85%) !important}

/* REDISEÑO UI v4 · Claridad: etiquetas, acciones visibles, lista rotulada */
.ux-prof .profile-info-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.ux-prof .pi-tile{display:flex;flex-direction:column;gap:4px;padding:10px 14px;background:#fff;border:1px solid color-mix(in srgb,var(--rc) 22%,#e2e8f0);border-radius:12px;min-width:0}
.ux-prof .pi-tile:nth-child(3){grid-column:1/-1}
.ux-prof .pi-lbl{font-size:.68rem;font-weight:700;text-transform:uppercase;letter-spacing:.05em;color:#64748b}
.ux-prof .pi-lbl em{font-style:normal;text-transform:none;letter-spacing:0;font-weight:600;color:var(--rc)}
.ux-prof .pi-val{font-size:1rem;font-weight:700;color:#0f172a;overflow-wrap:anywhere}
.ux-prof .pi-select{border:1.5px dashed var(--rc) !important;background:#fff !important;border-radius:8px;padding:6px 10px;font-weight:700;font-size:.95rem;color:#0f172a;cursor:pointer;margin:0 !important;width:100%}
.ux-prof .pi-tile.clickable-phone{cursor:pointer}.ux-prof .pi-tile.clickable-phone:hover{border-color:#16a34a;background:#f0fdf4}
.ux-prof .pi-tile.clickable-phone .pi-lbl i{color:#16a34a}
.ux-prof .pa-row{display:grid;grid-template-columns:1fr;gap:8px;margin-top:2px}
.ux-prof .pa-row .pa-item{border:1.5px solid #cbd5e1;background:#fff;border-radius:10px;justify-content:flex-start;padding:9px 12px}
.ux-prof .pa-row .pa-item:hover{border-color:var(--rc);background:#f8fafc}
.ux-prof .pa-row .pa-on{background:#ecfdf5;border-color:#a7f3d0;color:#047857}
.ux-prof .pa-row .pa-off{background:#fef2f2;border-color:#fecaca;color:#b91c1c}
.ux-prof .profile-actions{min-width:210px}
.profile-tab small{font-weight:600;opacity:.7;margin-left:2px}
.yf-label{font-size:.68rem;font-weight:700;text-transform:uppercase;letter-spacing:.05em;color:#64748b;margin:4px 0 6px}
@media(max-width:900px){.ux-prof .profile-info-grid{grid-template-columns:1fr}.ux-prof .pi-tile:nth-child(3){grid-column:auto}.ux-prof .pa-row{grid-template-columns:1fr 1fr}}


/* REDISEÑO UI v5 · "Carnet" lateral fijo + anillo de camino (escritorio ≥1100px) */
.pc-camino{display:flex;align-items:center;gap:14px;padding:12px 14px;border-radius:14px;background:#fff;border:1px solid color-mix(in srgb,var(--rc) 25%,#e2e8f0);margin:0 0 10px}
.pc-ring{--p:0;flex:none;width:64px;height:64px;border-radius:50%;display:grid;place-items:center;background:conic-gradient(var(--rc) calc(var(--p)*1%),#e2e8f0 0)}
.pc-ring b{width:48px;height:48px;border-radius:50%;background:#fff;display:grid;place-items:center;font-size:1.1rem;color:#0f172a;line-height:1}
.pc-ring small{font-size:.65rem;color:#64748b;margin-left:1px}
.pc-camino-txt{display:flex;flex-direction:column;min-width:0}
.pc-camino-txt span{font-size:.66rem;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:#64748b}
.pc-camino-txt strong{font-size:1.05rem;color:#0f172a;overflow-wrap:anywhere}
.pc-camino-txt em{font-style:normal;font-size:.75rem;color:var(--rc);font-weight:700}
@media(min-width:1100px){
  .adult-profile-panel:has(.ux-prof){display:grid;grid-template-columns:292px minmax(0,1fr);grid-template-rows:max-content 1fr;align-items:start;background:#eef2f7}
  .adult-profile-panel .ux-prof{grid-column:1;grid-row:1/3;position:sticky;top:0;align-self:start;flex-direction:column !important;align-items:stretch;text-align:center;gap:12px;padding:46px 18px 20px !important;margin:14px 0 14px 14px;border-radius:22px;border:1px solid #dbe3ee;border-top:8px solid var(--rc) !important;box-shadow:0 10px 30px rgba(15,23,42,.10)}
  .adult-profile-panel .ux-prof::before{content:'';position:absolute;top:14px;left:50%;transform:translateX(-50%);width:54px;height:10px;border-radius:6px;background:#cbd5e1;box-shadow:inset 0 2px 3px rgba(15,23,42,.25)}
  .adult-profile-panel .ux-prof>div:first-child{align-self:center}
  .adult-profile-panel .ux-prof .profile-pic-large{width:132px;height:132px}
  .adult-profile-panel .ux-prof h2{font-size:1.45rem}
  .adult-profile-panel .ux-prof .profile-info{width:100%;text-align:center}
  .adult-profile-panel .ux-prof .badge-rama{justify-content:center}
  .adult-profile-panel .ux-prof .profile-info-grid{grid-template-columns:1fr !important;text-align:left}
  .adult-profile-panel .ux-prof .pi-tile:nth-child(3){grid-column:auto}
  .adult-profile-panel .ux-prof .pc-camino{text-align:left}
  .adult-profile-panel .ux-prof .profile-actions{min-width:0;width:100%}
  .adult-profile-panel:has(.ux-prof) .profile-tabs{grid-column:2;grid-row:1;margin:14px 14px 0 14px;border-radius:14px 14px 0 0;border:1px solid #e2e8f0;border-bottom:0;overflow-x:auto}
  .adult-profile-panel:has(.ux-prof) .profile-content-area{grid-column:2;grid-row:2;margin:0 14px 14px;border-radius:0 0 14px 14px;border:1px solid #e2e8f0;border-top:0;background:#f8fafc;padding:22px 24px}
}
@media(min-width:1100px){
  .adult-profile-panel .ux-prof{position:relative;top:auto;gap:8px;padding:40px 16px 16px !important}
  .adult-profile-panel .ux-prof .profile-pic-large{width:104px;height:104px}
  .adult-profile-panel .ux-prof h2{font-size:1.3rem;margin-bottom:4px}
  .adult-profile-panel .ux-prof .badge-rama{display:flex;flex-wrap:wrap;gap:2px 6px;font-size:.78rem;padding:5px 10px}
  .adult-profile-panel .ux-prof .pi-tile{padding:7px 12px}
  .adult-profile-panel .ux-prof .profile-info-grid{gap:6px}
  .adult-profile-panel .ux-prof .pa-row{grid-template-columns:1fr 1fr}
  .adult-profile-panel .ux-prof .pa-row .pa-item{font-size:.76rem;padding:8px;justify-content:center;text-align:center}
  .adult-profile-panel:has(.ux-prof) .profile-tabs{position:sticky;top:0;z-index:20}
}
@media(min-width:1100px){.adult-profile-panel:has(.ux-prof) .profile-tab{padding:8px 11px !important;font-size:.76rem !important}}

/* v5.1 · Lista compacta y plegable cuando hay un perfil abierto */
.yl-toggle{display:none}
@media(min-width:1100px){
  .programa-layout:has(.ux-prof) .yl-toggle{display:grid;place-items:center;position:absolute;top:10px;right:10px;width:28px;height:28px;border-radius:8px;border:1px solid #cbd5e1;background:#fff;color:#475569;cursor:pointer;z-index:5}
  .programa-layout:has(.ux-prof) .adult-list-header{position:relative;padding-right:44px}
  .programa-layout:has(.ux-prof) .adult-list-panel{width:252px;transition:width .2s}
  .programa-layout:has(.ux-prof) .adult-list-panel h3{font-size:.95rem}
  .programa-layout:has(.ux-prof) .adult-list-panel h3+button,.programa-layout:has(.ux-prof) .adult-list-header>div:first-of-type>button:not(.yl-toggle){display:none}
  .programa-layout:has(.ux-prof) .adult-list-item{padding:8px 10px;gap:10px}
  .programa-layout:has(.ux-prof) .adult-list-pic{width:36px;height:36px}
  .programa-layout:has(.ux-prof) .adult-list-info h4{font-size:.82rem}
  .programa-layout:has(.ux-prof) .adult-list-badge{display:none}
  .programa-layout.lista-oculta .adult-list-panel{width:68px}
  .programa-layout.lista-oculta .adult-list-header>*:not(.yl-toggle){display:none !important}
  .programa-layout.lista-oculta .yl-toggle{position:static;margin:8px auto}
  .programa-layout.lista-oculta .yl-toggle i{transform:rotate(180deg)}
  .programa-layout.lista-oculta .adult-list-header{padding:0;border:0}
  .programa-layout.lista-oculta .adult-list-info{display:none}
  .programa-layout.lista-oculta .adult-list-item{justify-content:center;padding:8px 0}
}
@media(min-width:1100px){.programa-layout:has(.ux-prof) .search-wrapper input{font-size:.8rem;padding-right:6px;text-overflow:ellipsis}.programa-layout:has(.ux-prof) .adult-list-header{padding-right:12px}.programa-layout:has(.ux-prof) .adult-list-header h3{padding-right:34px}}
