/* Estilos propios de SEI 360. Se carga después de style.css y solo agrega: nunca se edita style.css para esto.
   Todo color sale de las variables del tema. */

/* ---------- Ingreso ---------- */
.pt-error-texto { color: var(--danger); font-size: 0.85rem; margin: 8px 0 0; }
#ingreso-dev { margin-top: 10px; border-top: 1px dashed var(--border); padding-top: 10px; }

/* ---------- Inicio ---------- */
.bienvenida { margin: 4px 0 18px; }
.inicio-titulo { margin: 0 0 4px; font-size: 1.6rem; font-weight: 700; }
.inicio-rejilla { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.tj-vacio { color: var(--text-muted); font-style: italic; }

/* ---------- Módulos ---------- */
#vista-modulo .formulario { display: flex; flex-direction: column; gap: 4px; }
.alea-resultado { margin-top: 16px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-surface); }
.alea-resultado h4 { margin: 0 0 8px; display: flex; align-items: center; gap: 6px; }
.tj-datos { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 0 0 10px; font-size: 0.88rem; }
.tj-datos dt { color: var(--text-secondary); }
.tj-datos dd { margin: 0; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }

/* ---------- Franja ---------- */
.franja-ia { margin-left: auto; }

/* El enlace de Administración del menú (es un <a>, no un botón) */
a.ml-item { text-decoration: none; }
.ml-item[hidden] { display: none; }

/* ---------- Avisos de módulos (punto en el menú y franja en Inicio) ---------- */
.ml-aviso { position: absolute; top: 6px; left: 24px; width: 9px; height: 9px; border-radius: 50%; background: #F59E0B; border: 2px solid var(--ml-fondo, #0B1B3A); }
html:not([data-menu="colapsado"]) .ml-aviso { left: auto; right: 10px; top: 50%; transform: translateY(-50%); }
.inicio-aviso { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 16px; padding: 12px 14px; border-radius: 10px; border: 1px solid #F59E0B; background: rgba(245, 158, 11, 0.12); }
.inicio-aviso > span { flex: 1 1 240px; font-weight: 600; }

/* ---------- Mi perfil ---------- */
.pf-foto { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; padding: 12px; border: 1.5px dashed var(--primary); background: var(--bg-input); border-radius: 12px; }
.pf-foto-info { font-size: 0.82rem; color: var(--text-muted); flex: 1 1 140px; }
.pf-foto-info b { display: block; font-size: 0.9rem; color: var(--text-primary); }
.pf-foto img { width: 72px; height: 90px; object-fit: cover; border-radius: 10px; background: var(--bg-elevated); flex: none; }
.pf-error { color: #F87171; font-size: 0.82rem; font-weight: 600; }
.pf-contador { font-size: 0.75rem; color: var(--text-muted); font-weight: 400; }
.pf-grupo { grid-column: 1 / -1; margin: 8px 0 0; font-weight: 700; }
.pf-campo-ancho { grid-column: 1 / -1; }
.pf-icono { width: 100%; }
.pt-form-usuario input[type=checkbox] { width: 18px; height: 18px; flex: none; }
.pt-form-usuario .pt-check-campo { font-weight: 400; align-items: center; gap: 8px; }
.pf-campo-ancho > strong { display: block; font-size: 0.85rem; }
.pf-campo-ancho > small { display: block; margin: 2px 0 8px; }
.pf-foto input[type=file] { width: auto; max-width: 100%; height: auto; padding: 6px; border: 1px solid var(--border, #334155); border-radius: 8px; background: transparent; color: inherit; }
.pf-barra { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 10px 16px; margin: 0 0 12px; }
.pf-barra label { display: flex; flex-direction: column; gap: 4px; font-size: 0.85rem; font-weight: 600; }
.pf-barra .input { width: auto; min-width: 200px; }

/* ---------- Mi perfil: formulario + vista previa en vivo ---------- */
.pf-layout { display: grid; grid-template-columns: minmax(360px, 560px) 1fr; gap: 24px; align-items: start; }
.pf-col-form { min-width: 0; }
.pf-col-prev { position: sticky; top: 8px; min-width: 0; max-height: calc(100vh - 90px); overflow-y: auto; overscroll-behavior: contain; }
.pf-prev-marco { border-radius: 14px; overflow: hidden; }
.pf-prev-escala { width: 100%; position: relative; overflow: hidden; }
#pf-prev { border: 0; width: 1200px; height: 1500px; transform-origin: 0 0; background: #eef1f6; display: block; }
.pf-prev-nota { text-align: center; margin-top: 8px; }
.pf-pestanas { display: none; gap: 4px; margin: 0 0 12px; }
.pf-pestanas button { border: 1px solid var(--border, #334155); background: transparent; color: inherit; font: inherit; padding: 6px 16px; border-radius: 999px; cursor: pointer; }
.pf-pestanas button.activa { background: var(--sei-azul, #2563EB); border-color: transparent; color: #fff; }
@media (max-width: 1000px) {
  .pf-pestanas { display: flex; }
  .pf-layout { grid-template-columns: 1fr; }
  .pf-layout[data-vista=form] .pf-col-prev { display: none; }
  .pf-layout[data-vista=prev] .pf-col-form { display: none; }
  .pf-col-prev { position: static; max-height: none; overflow: visible; }
}
.pf-n { display: inline-grid; place-items: center; width: 24px; height: 24px; margin-right: 8px; border-radius: 50%; background: var(--sei-azul, #2563EB); color: #fff; font-size: 0.78rem; }
.pf-grupo small { display: block; font-weight: 400; }
.pf-fila { display: flex; align-items: center; gap: 10px; }
.pf-fila .input { flex: 1; min-width: 0; }
.pf-icono { flex: none; width: 40px; height: 40px; padding: 0; border-radius: 50%; border: 1.5px solid #d5dce8; background: #fff; display: grid; place-items: center; cursor: pointer; }
.pf-icono.vacio { background: #e3e9f3; opacity: 0.7; }
.pf-icono:hover:not(:disabled) { box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.35); }
.pf-icono:disabled { cursor: default; }
.pf-icono svg, .pf-sel-rejilla svg { width: 30px; height: 30px; fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.duo .n { fill: none; stroke: #082D59; }
.duo .y { fill: none; stroke: #FFB900; }
.duo .ny { fill: #FFB900; stroke: #082D59; }
.duo .yf { fill: #FFB900; stroke: #FFB900; }
.pf-selector { margin: 8px 0 4px; padding: 10px; background: #fff; border: 1.5px solid #d5dce8; border-radius: 12px; box-shadow: 0 6px 20px rgba(0, 32, 91, 0.25); }
.pf-sel-auto { width: 100%; margin-bottom: 8px; padding: 8px 10px; border: 1.5px solid #d5dce8; border-radius: 8px; background: #e3e9f3; color: #082D59; font: inherit; font-size: 0.85rem; font-weight: 500; cursor: pointer; text-align: left; }
.pf-sel-auto.act { border-color: #082D59; }
.pf-sel-rejilla { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 6px; max-height: 180px; overflow: auto; }
.pf-sel-rejilla button { aspect-ratio: 1; border: 1.5px solid #d5dce8; border-radius: 10px; background: #fff; display: grid; place-items: center; cursor: pointer; padding: 0; }
.pf-sel-rejilla button:hover { border-color: #082D59; }
.pf-sel-rejilla button.act { background: #FFB900; border-color: #082D59; }
.pf-cont { display: block; text-align: right; font-size: 0.75rem; font-weight: 400; color: var(--text-muted); }
.pf-cont.casi { color: #F59E0B; }
.pf-cont.pasado { color: #F87171; font-weight: 700; }
.pf-foto-vacia { width: 72px; height: 90px; flex: none; border-radius: 10px; background: var(--bg-elevated, #1e293b); display: grid; place-items: center; color: var(--text-muted); font-size: 0.8rem; }
.pf-acciones { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; padding: 12px 0; margin-top: 18px; background: var(--bg-base); border-top: 1px solid var(--border); }
.pf-msg { margin-right: auto; font-size: 0.88rem; color: var(--text-muted); }
.pf-msg.ok { color: #34D399; font-weight: 600; }
.pf-msg.mal { color: #F87171; font-weight: 600; }
.pf-bienvenida h3 { font-size: 1.4rem; }
.pf-aviso { margin: 10px 0; padding: 8px 12px; font-weight: 600; background: rgba(245, 158, 11, 0.14); border-left: 4px solid #F59E0B; border-radius: 0 8px 8px 0; }
.pf-cerrado { margin: 0 0 16px; padding: 12px 16px; border-radius: 12px; font-weight: 600; background: rgba(248, 113, 113, 0.14); color: #F87171; }

/* Campos alineados: cada campo ocupa 4 filas (etiqueta, ayuda, control, pie) compartidas con su vecino */
.pf-rejilla { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 14px; }
.pf-campo { display: grid; grid-row: span 4; grid-template-rows: subgrid; min-width: 0; }
.pf-ancho { grid-column: 1 / -1; }
.pf-rejilla > .pf-grupo { grid-column: 1 / -1; margin: 10px 0 8px; font-weight: 700; }
.pf-etq { font-size: 0.85rem; font-weight: 600; margin-bottom: 2px; }
.pf-ayuda { display: block; margin-bottom: 6px; font-size: 0.78rem; }
.pf-campo .input, .pf-control { width: 100%; align-self: start; }
.pf-pie { display: flex; justify-content: space-between; gap: 8px; min-height: 1.1rem; margin: 3px 0 10px; }
.pf-check > label { grid-row: 3; align-self: center; display: flex; align-items: center; gap: 8px; font-weight: 400; }
/* Firma de correo bajo la vista previa */
.pf-firma { margin-top: 14px; }
.pf-firma-vista img { display: block; width: 100%; height: auto; border: 1px solid var(--border); border-radius: 10px; background: #fff; }
.pf-firma-acciones { margin-top: 10px; }
/* Mi perfil: espacio entre las tarjetas */
#perfil-estado > * { margin-bottom: 16px; }
#perfil-formulario > details.ac-panel { margin: 0 0 16px; }
.pf-aviso { font-size: 0.9rem; }
/* Franja superior: foto en círculo + alias y nombre */
.franja-ia.con-foto::before { display: none; }
.fu-foto { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border); flex: none; }
.fu-txt { display: flex; flex-direction: column; line-height: 1.15; text-align: right; }
.fu-txt b { color: var(--text-primary); font-size: 0.92rem; }
.fu-txt small { font-size: 0.75rem; color: var(--text-secondary); }
#franja-titulo { display: inline-flex; align-items: center; gap: 8px; }
#franja-titulo .lucide { width: 18px; height: 18px; }
