/* =========================================================
   ficha.css — ficha de edición única de usuarios (js/admin-ficha.js). Prefijo edf-
   Un solo estilo para estudiante, acudiente, rector, coordinador, docente y docente padrino.
   ========================================================= */
body.edf-abierto { overflow: hidden; }
.edf-ov { position: fixed; inset: 0; z-index: 9500; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(15, 23, 42, .55); backdrop-filter: blur(3px); animation: edf-in .18s ease-out; }
@keyframes edf-in { from { opacity: 0; } to { opacity: 1; } }
.edf { --c: #1d4ed8; --s: #e8efff; --b: #c9d8fb; width: min(780px, 100%); max-height: min(92vh, 100%); display: flex; flex-direction: column; background: #f6f8fd; border-radius: 22px; box-shadow: 0 24px 70px rgba(15, 23, 42, .45); overflow: hidden; outline: none; animation: edf-up .22s ease-out; }
@keyframes edf-up { from { transform: translateY(14px); opacity: .6; } to { transform: none; opacity: 1; } }
.edf-h { flex: none; display: flex; align-items: center; gap: 14px; padding: 16px 18px; color: #fff; background: linear-gradient(120deg, #1e3a8a, var(--c)); }
.edf-h__av { flex: none; width: 54px; height: 54px; display: grid; place-items: center; font-size: 1.7rem; border-radius: 18px; background: rgba(255, 255, 255, .2); }
.edf-h__t { flex: 1; min-width: 0; line-height: 1.25; }
.edf-h__t small { display: block; opacity: .85; font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.edf-h__t h3 { margin: 2px 0 0; font-size: 1.2rem; overflow-wrap: anywhere; color: #fff; }
.edf-h__t p { margin: 3px 0 0; font-size: .84rem; opacity: .9; overflow-wrap: anywhere; }
.edf-x { flex: none; width: 40px; height: 40px; border: 0; border-radius: 12px; background: rgba(255, 255, 255, .18); color: #fff; font-size: 1.1rem; cursor: pointer; }
.edf-x:hover { background: rgba(255, 255, 255, .32); }
.edf-b { flex: 1; overflow-y: auto; padding: 14px 16px 20px; display: flex; flex-direction: column; gap: 12px; -webkit-overflow-scrolling: touch; }
/* estado */
.edf-estado { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 16px; border: 1.5px solid; background: #fff; }
.edf-estado.is-on { border-color: #bfe6cb; background: linear-gradient(135deg, #e4f6ea, #fff 80%); }
.edf-estado.is-off { border-color: #f4dba6; background: linear-gradient(135deg, #fff3d9, #fff 80%); }
.edf-estado__ico { flex: none; width: 44px; height: 44px; display: grid; place-items: center; font-size: 1.4rem; border-radius: 14px; background: #fff; box-shadow: 0 1px 5px rgba(15, 31, 77, .12); }
.edf-estado__t { flex: 1; min-width: 0; line-height: 1.35; }
.edf-estado__t b { display: block; font-size: 1.02rem; }
.edf-estado__t small { color: #5b6472; font-size: .82rem; }
.edf-sw { flex: none; display: inline-flex; align-items: center; gap: 10px; padding: 5px 14px 5px 5px; border: 0; border-radius: 999px; background: #cbd5e1; color: #334155; font: inherit; font-weight: 800; font-size: .85rem; cursor: pointer; transition: background .2s; min-height: 40px; }
.edf-sw i { width: 30px; height: 30px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .3); transition: transform .2s; }
.edf-sw.is-on { background: #16a34a; color: #fff; flex-direction: row-reverse; padding: 5px 5px 5px 14px; }
.edf-sw:disabled { opacity: .6; cursor: wait; }
/* secciones */
.edf-sec { background: #fff; border: 1px solid #e0e7f5; border-radius: 16px; overflow: hidden; }
.edf-sec > summary { display: flex; align-items: center; gap: 12px; padding: 12px 14px; cursor: pointer; list-style: none; min-height: 56px; }
.edf-sec > summary::-webkit-details-marker { display: none; }
.edf-sec > summary:hover { background: #f6f9ff; }
.edf-sec__i { flex: none; width: 38px; height: 38px; display: grid; place-items: center; font-size: 1.15rem; border-radius: 12px; background: var(--s); }
.edf-sec__t { flex: 1; min-width: 0; display: grid; line-height: 1.3; }
.edf-sec__t b { font-size: .98rem; }
.edf-sec__t small { color: #64748b; font-size: .8rem; }
.edf-sec__c { flex: none; color: #64748b; transition: transform .2s; }
.edf-sec[open] > summary { border-bottom: 1px solid #e8edf8; background: #f8faff; }
.edf-sec[open] .edf-sec__c { transform: rotate(180deg); }
.edf-sec__b { padding: 14px; min-width: 0; }
.edf-sec__b .usr-form, .edf-sec__b form { margin: 0; padding: 0; border: 0; background: none; box-shadow: none; }
.edf-sec__b .usr-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.edf-sec__b .usr-span2 { grid-column: 1 / -1; }
.edf-sec__b input, .edf-sec__b select, .edf-sec__b textarea { max-width: 100%; min-width: 0; }
/* zona de peligro */
.edf-peligro__c { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; border: 1.5px dashed #f1b4b4; background: #fff6f6; }
.edf-peligro__c > span { flex: none; font-size: 1.4rem; }
.edf-peligro__c > div:not(.edf-peligro__bt) { flex: 1; min-width: 0; display: grid; line-height: 1.3; }
.edf-peligro__c b { color: #991b1b; }
.edf-peligro__c small { color: #7f1d1d; font-size: .8rem; }
.edf-peligro__bt { display: flex; gap: 8px; flex-wrap: wrap; }
.edf-del { color: #b91c1c !important; border-color: #f1b4b4 !important; }
.edf-del--ok { background: #dc2626 !important; color: #fff !important; border-color: #dc2626 !important; }
.edf-chip-off { display: inline-block; padding: 2px 10px; border-radius: 999px; background: #fff3d9; color: #92400e; border: 1px solid #f4dba6; font-size: .75rem; font-weight: 800; white-space: nowrap; }
/* fila de usuario inactiva: se atenúa un poco */
.usr-row.is-inactivo, .ax-row.is-inactivo { background-image: repeating-linear-gradient(135deg, transparent 0 10px, rgba(148, 163, 184, .09) 10px 20px); }
.usr-row.is-inactivo .usr-row__av, .ax-row.is-inactivo .ax-av { filter: grayscale(.7); }
/* teléfono: la ficha ocupa toda la pantalla, sin desbordar */
@media (max-width: 640px) {
  .edf-ov { padding: 0; align-items: flex-end; }
  .edf { width: 100%; max-height: 96vh; max-height: 96dvh; border-radius: 22px 22px 0 0; }
  .edf-h { padding: 14px; gap: 10px; }
  .edf-h__av { width: 46px; height: 46px; font-size: 1.4rem; }
  .edf-b { padding: 12px 12px 22px; }
  .edf-estado { flex-wrap: wrap; }
  .edf-estado__t { flex-basis: calc(100% - 70px); }
  .edf-sw { margin-left: auto; }
  .edf-sec__b { padding: 12px 10px; }
  .edf-sec__b .usr-grid { grid-template-columns: 1fr; }
  .edf-peligro__c { flex-wrap: wrap; }
}
