/* Esqueleto de app compartido por los portales rediseñados (tutor y docente):
   barra de pestañas abajo en el celular, menú lateral en computadora, barra
   superior, tarjetas, botones y la pantalla Menú. El prefijo ta- es histórico
   (nació en el portal del tutor). Paleta clara; el modo oscuro la invierte. */
[hidden] { display: none !important; }

.ta-app { display: flex; height: 100vh; height: 100dvh; background: #f9fafb; }
.ta-columna { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ta-main { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.ta-contenido { max-width: 960px; margin: 0 auto; padding: 16px 16px 24px; }
.ta-contenido.amplio { max-width: none; }

/* Barra superior */
.ta-topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 56px; padding: 0 12px 0 16px; background: #fff; border-bottom: 1px solid #f3f4f6; flex-shrink: 0; position: relative; z-index: 40; }
.ta-topbar-marca { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ta-topbar-marca img { width: 30px; height: 30px; object-fit: contain; flex-shrink: 0; }
.ta-topbar-titulo { margin: 0; font-size: 1.1rem; font-weight: 700; color: #111827; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Aviso de sesión suplantada (admin viendo como otro usuario) */
.ta-suplantando { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 6px 12px; background: #7c3aed; color: #fff; font-size: .82rem; }
.ta-suplantando a { color: #fff; font-weight: 700; text-decoration: underline; }

/* Menú lateral (solo computadora) */
.ta-sidebar { display: none; width: 240px; flex-shrink: 0; background: #fff; border-right: 1px solid #f3f4f6; flex-direction: column; }
.ta-sidebar-logo { display: flex; align-items: center; gap: 10px; height: 64px; padding: 0 18px; background: linear-gradient(90deg, #f97316, #ea580c); color: #fff; }
.ta-sidebar-logo img { width: 34px; height: 34px; object-fit: contain; }
.ta-sidebar-logo b { display: block; font-size: 1.1rem; }
.ta-sidebar-logo small { display: block; font-size: .72rem; opacity: .85; }
.ta-sidebar nav { flex: 1; padding: 14px 10px; overflow-y: auto; }
.ta-sidebar-grupo { margin: 16px 14px 6px; font-size: .7rem; font-weight: 700; color: #9ca3af; text-transform: uppercase; letter-spacing: .06em; }
.ta-sidebar-link { display: flex; align-items: center; gap: 12px; padding: 11px 14px; margin-bottom: 4px; border-radius: 10px; color: #374151; text-decoration: none; font-weight: 600; font-size: .95rem; position: relative; }
.ta-sidebar-link i { font-size: 1.3rem; color: #9ca3af; }
.ta-sidebar-link:hover { background: #fff7ed; color: #9a3412; }
.ta-sidebar-link.activo { background: #fff7ed; color: #ea580c; }
.ta-sidebar-link.activo i { color: #f97316; }
.ta-sidebar-pie { border-top: 1px solid #f3f4f6; padding: 10px; }
.ta-sidebar-pie .ta-sidebar-link { font-weight: 500; font-size: .88rem; }
.ta-usuario { display: block; padding: 8px 14px; font-size: .8rem; color: #6b7280; text-decoration: none; border-radius: 10px; }
.ta-usuario b { display: block; color: #111827; font-size: .85rem; }
a.ta-usuario:hover { background: #fff7ed; }

/* Botón "+ Crear" del menú lateral (despliega las opciones debajo) */
.ta-crear { position: relative; margin: 0 4px 6px; }
.ta-crear > summary, .ta-crear-boton { list-style: none; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 14px; border-radius: 12px; background: #f97316; color: #fff; font-weight: 700; font-size: .95rem; cursor: pointer; box-shadow: 0 4px 12px rgba(249,115,22,.25); text-decoration: none; }
.ta-crear > summary::-webkit-details-marker { display: none; }
.ta-crear > summary:hover, .ta-crear-boton:hover, .ta-crear-boton.activo { background: #ea580c; color: #fff; }
.ta-crear > summary i, .ta-crear-boton i { font-size: 1.2rem; color: #fff; }
/* Cuando solo hay una cosa que crear, el botón es un enlace directo */
.ta-crear-boton { margin: 0 4px 6px; }
.ta-crear-menu { margin-top: 6px; background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; box-shadow: 0 12px 28px rgba(0,0,0,.12); padding: 6px; }
.ta-crear-menu a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: #111827; text-decoration: none; font-size: .9rem; font-weight: 500; }
.ta-crear-menu a:hover { background: #fff7ed; }

/* Globo de pendientes */
.ta-globo { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: #ef4444; color: #fff; font-size: .68rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; line-height: 1; }
.ta-sidebar-link .ta-globo { margin-left: auto; }
.ta-menu-item .ta-globo { margin-left: auto; min-width: 22px; height: 22px; font-size: .75rem; }
.ta-menu-item .ta-globo + .ta-chevron { margin-left: 8px; }
/* Punto de la pestaña "Menú": hay globos en entradas que no caben en la barra */
.ta-punto { position: absolute; top: 1px; right: 15px; width: 10px; height: 10px; border-radius: 50%; background: #ef4444; border: 2px solid #fff; }
.ta-sidebar-link .ta-punto { position: static; margin-left: auto; margin-right: 4px; border: 0; flex-shrink: 0; }

/* Barra de pestañas (solo celular) */
.ta-tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; display: flex; background: #fff; border-top: 1px solid #e5e7eb; box-shadow: 0 -4px 16px rgba(0,0,0,.06); padding-bottom: env(safe-area-inset-bottom, 0px); }
.ta-tab { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 64px; padding: 8px 2px 6px; color: #6b7280; text-decoration: none; font-size: .7rem; font-weight: 500; border: 0; background: none; cursor: pointer; font-family: inherit; }
/* Indicador tipo píldora detrás del icono (estilo de navegación actual de Android) */
.ta-tab-icono { position: relative; display: flex; align-items: center; justify-content: center; width: 56px; height: 30px; border-radius: 999px; transition: background .2s; }
.ta-tab-icono i { font-size: 1.5rem; line-height: 1; }
.ta-tab-texto { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.ta-tab.activo { color: #c2410c; font-weight: 700; }
.ta-tab.activo .ta-tab-icono { background: #ffedd5; }
.ta-tab .ta-globo { position: absolute; top: -2px; right: 8px; border: 2px solid #fff; }
.ta-tab-avatar { width: 26px; height: 26px; border-radius: 50%; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; background: #ffedd5; color: #c2410c; font-weight: 700; font-size: .8rem; box-shadow: 0 0 0 2px #fff, 0 0 0 3px #d1d5db; }
.ta-tab-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ta-tab.activo .ta-tab-avatar, .ta-sidebar-link.activo .ta-tab-avatar { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #f97316; }
/* Pestaña central "Crear": botón naranja redondo, destacado */
.ta-tab-crear .ta-tab-icono { width: 48px; height: 48px; margin-top: -14px; border-radius: 50%; background: #f97316; color: #fff; box-shadow: 0 6px 16px rgba(249,115,22,.35); }
.ta-tab-crear .ta-tab-icono i { font-size: 1.6rem; -webkit-text-stroke: 1px currentColor; }
.ta-tab-crear.activo .ta-tab-icono { background: #ea580c; }

/* Hoja que sube desde abajo (opciones de "Crear" en el celular) */
.ta-hoja-fondo { position: fixed; inset: 0; z-index: 60; background: rgba(17,24,39,.45); display: flex; align-items: flex-end; justify-content: center; }
.ta-hoja { width: 100%; max-width: 560px; background: #fff; border-radius: 20px 20px 0 0; padding: 10px 12px calc(16px + env(safe-area-inset-bottom, 0px)); box-shadow: 0 -12px 32px rgba(0,0,0,.18); animation: ta-subir .2s ease-out; }
.ta-hoja-asa { width: 40px; height: 4px; border-radius: 999px; background: #d1d5db; margin: 0 auto 10px; }
.ta-hoja-titulo { margin: 0 6px 8px; font-size: 1rem; font-weight: 700; color: #111827; }
.ta-hoja .ta-menu-item { border-radius: 12px; border-bottom: 0; }
.ta-hoja .ta-menu-item:hover { background: #fff7ed; }
.ta-hoja .ta-menu-item.actual { background: #fff7ed; font-weight: 700; }
.ta-hoja-nota { margin-left: auto; color: #9a3412; font-size: .75rem; font-weight: 500; }
/* Hoja para leer algo largo (p. ej. un reporte): se desplaza por dentro */
.ta-hoja.lectura { max-height: 88vh; max-height: 88dvh; overflow-y: auto; }
.ta-hoja-cancelar { display: block; width: 100%; margin-top: 6px; padding: 12px; border: 0; border-radius: 12px; background: #f3f4f6; color: #374151; font-weight: 600; font-size: .95rem; cursor: pointer; }
@keyframes ta-subir { from { transform: translateY(100%); } to { transform: translateY(0); } }

@media (max-width: 1023px) {
    .ta-main { padding-bottom: calc(68px + env(safe-area-inset-bottom, 0px)); }
}
@media (min-width: 1024px) {
    .ta-sidebar { display: flex; }
    .ta-tabs, .ta-hoja-fondo:not(.siempre) { display: none !important; }
    /* Hoja que también se usa en computadora: ventana centrada */
    .ta-hoja-fondo.siempre { align-items: center; }
    .ta-hoja-fondo.siempre .ta-hoja { max-width: 420px; border-radius: 20px; padding-bottom: 16px; }
    .ta-hoja-fondo.siempre .ta-hoja.lectura { max-width: 600px; padding: 18px 16px; }
    .ta-hoja-fondo.siempre .ta-hoja-asa { display: none; }
    .ta-topbar-marca img { display: none; }
    .ta-contenido { padding: 24px 32px 32px; }
}

/* Tarjetas y botones */
.ta-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 16px; overflow: hidden; margin-bottom: 16px; }
.ta-card-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; border-bottom: 1px solid #f3f4f6; }
.ta-card-titulo { margin: 0; font-size: 1.02rem; font-weight: 700; color: #111827; display: flex; align-items: center; gap: 8px; }
.ta-card-titulo i { color: #f97316; font-size: 1.2rem; }

.ta-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 8px 16px; border-radius: 10px; font-weight: 600; font-size: .9rem; border: 1px solid transparent; cursor: pointer; text-decoration: none; white-space: nowrap; }
.ta-btn-primary { background: #f97316; color: #fff; }
.ta-btn-primary:hover { background: #ea580c; color: #fff; }
.ta-btn-secondary { background: #fff; color: #374151; border-color: #d1d5db; }
.ta-btn-secondary:hover { background: #f9fafb; color: #111827; }

.ta-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: #ffedd5; color: #c2410c; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .9rem; overflow: hidden; }
.ta-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ta-avatar.grande { width: 56px; height: 56px; font-size: 1.3rem; }

/* Menú */
.ta-menu-grupo { margin: 18px 4px 8px; font-size: .75rem; font-weight: 700; color: #9ca3af; text-transform: uppercase; letter-spacing: .05em; }
.ta-menu-item { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; border: 0; border-bottom: 1px solid #f3f4f6; background: #fff; color: #111827; text-decoration: none; font-size: .98rem; font-weight: 500; text-align: left; cursor: pointer; font-family: inherit; }
.ta-menu-item:last-child { border-bottom: 0; }
/* Icono dentro de un cuadrito de color suave, como los ajustes del teléfono */
.ta-menu-icono { width: 38px; height: 38px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 1.3rem; }
.ta-menu-item .ta-chevron { margin-left: auto; color: #d1d5db; font-size: 1.15rem; }
.ta-menu-item.peligro { color: #b91c1c; }
.ta-menu-item .theme-switch { margin-left: auto; }

/* Franja de una lista con globo: "viendo solo lo pendiente / ver todo" (views/site/_franja-pendientes.php) */
.ta-franja-filtro { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; padding: 10px 14px; border: 1px solid #fecaca; border-radius: 12px; background: #fef2f2; color: #7f1d1d; font-size: .92rem; line-height: 1.35; text-decoration: none; }
.ta-franja-filtro > i { flex-shrink: 0; font-size: 1.2rem; color: #dc2626; }
.ta-franja-filtro > span:not(.accion) { flex: 1; min-width: 0; }
.ta-franja-filtro a, .ta-franja-filtro .accion { flex-shrink: 0; color: #b91c1c; font-weight: 700; text-decoration: none; white-space: nowrap; }
a.ta-franja-filtro:hover { background: #fee2e2; color: #7f1d1d; }
.ta-franja-filtro.listo { border-color: #bbf7d0; background: #f0fdf4; color: #14532d; }
.ta-franja-filtro.listo > i { color: #16a34a; }
.ta-franja-filtro.listo a { color: #166534; }

/* Listas: fichas para filtrar de un toque, filas tocables, etiquetas de estado, estado vacío y
   "Ver más". Las usan el portal del tutor (views/tutor/_lista.php) y las listas del personal
   (views/site/_listado.php). */
.ta-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 16px; scrollbar-width: none; }
.ta-chips::-webkit-scrollbar { display: none; }
.ta-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 4px 14px 4px 4px; border: 1px solid #e5e7eb; border-radius: 999px; background: #fff; color: #374151; font-weight: 600; font-size: .9rem; cursor: pointer; white-space: nowrap; flex-shrink: 0; }
.ta-chip.solo-texto { padding-left: 16px; }
.ta-chip.activo { border-color: #f97316; background: #fff7ed; color: #9a3412; }
.ta-chips + .ta-chips { margin-top: -6px; }
a.ta-chip { text-decoration: none; flex-shrink: 0; }
.ta-chip i { font-size: 1.1rem; }
.ta-chip-cuenta { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: #f97316; color: #fff; font-size: .72rem; font-weight: 700; }
.ta-chip.activo .ta-chip-cuenta { background: #c2410c; }
.ta-fila { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border-bottom: 1px solid #f3f4f6; text-decoration: none; color: inherit; scroll-margin-top: 72px; }
.ta-fila:last-child { border-bottom: 0; }
a.ta-fila:hover, a.ta-fila:active { background: #fafafa; color: inherit; }
.ta-fila > .ta-chevron { align-self: center; color: #d1d5db; font-size: 1.15rem; }
.ta-fila-cuerpo { display: block; flex: 1; min-width: 0; }
.ta-fila-cabeza { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.ta-fila-titulo { min-width: 0; font-size: 1rem; font-weight: 500; color: #111827; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ta-fila-cuando { flex-shrink: 0; font-size: .78rem; color: #9ca3af; }
.ta-fila.nueva .ta-fila-titulo { font-weight: 700; }
.ta-fila.nueva .ta-fila-cuando { color: #c2410c; font-weight: 600; }
.ta-fila-resumen { display: -webkit-box; margin-top: 2px; font-size: .9rem; line-height: 1.4; color: #6b7280; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ta-fila-pie { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 6px; font-size: .78rem; color: #6b7280; }
.ta-fila-pie i { font-size: .95rem; vertical-align: -2px; }
.ta-fila-punto { width: 10px; height: 10px; margin-top: 6px; border-radius: 50%; background: #f97316; flex-shrink: 0; }
.ta-etiqueta { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px; background: #f3f4f6; color: #374151; font-size: .72rem; font-weight: 600; }
.ta-etiqueta.urgente { background: #fee2e2; color: #991b1b; }
.ta-etiqueta.importante { background: #ffedd5; color: #9a3412; }
.ta-etiqueta.aviso { background: #fef3c7; color: #92400e; }
.ta-etiqueta.ok { background: #dcfce7; color: #166534; }
.ta-vacio-grande { padding: 44px 20px; text-align: center; color: #6b7280; }
.ta-vacio-grande i { display: block; margin-bottom: 10px; font-size: 3rem; color: #d1d5db; }
.ta-vacio-grande b { display: block; margin-bottom: 4px; color: #374151; font-size: 1.05rem; }
.ta-vacio-grande p { margin: 0; font-size: .92rem; line-height: 1.45; }
.ta-ver-mas { display: flex; width: 100%; min-height: 46px; margin: 4px 0 16px; text-decoration: none; }

/* Lista del personal (views/site/_listado.php): tabla en pantalla ancha, filas en el celular */
.ta-solo-ancha { display: none !important; }
.ta-solo-lectores { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ta-listado-barra { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.ta-buscar { position: relative; display: block; flex: 1 1 220px; margin: 0; }
.ta-buscar > i { position: absolute; top: 50%; left: 14px; transform: translateY(-50%); color: #9ca3af; font-size: 1.15rem; pointer-events: none; }
.ta-buscar input { display: block; width: 100%; min-height: 46px; padding: 10px 12px 10px 42px; border: 1px solid #d1d5db; border-radius: 12px; background: #fff; color: #111827; font: inherit; font-size: 16px; box-shadow: none; -webkit-appearance: none; appearance: none; }
.ta-buscar input:focus, .ta-listado-filtros select:focus, .ta-listado-filtros input:focus { outline: 0; border-color: #f97316; box-shadow: 0 0 0 3px #f9731626; }
.ta-listado-barra > .ta-btn { min-height: 46px; border-radius: 12px; }
.ta-listado-barra > .ta-btn.en-celular { flex: 1 1 100%; }
.ta-listado-filtros { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; flex: 1 1 100%; padding: 14px; border: 1px solid #e5e7eb; border-radius: 16px; background: #fff; }
.ta-listado-filtros label { display: block; margin: 0; }
.ta-listado-filtros label > span { display: block; margin-bottom: 6px; color: #374151; font-size: .84rem; font-weight: 600; }
.ta-listado-filtros select, .ta-listado-filtros input { display: block; width: 100%; min-height: 44px; padding: 9px 12px; border: 1px solid #d1d5db; border-radius: 10px; background-color: #fff; color: #111827; font: inherit; font-size: 16px; }
.ta-listado-filtros-pie { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; }
.ta-listado-filtros-pie .ta-btn { min-height: 44px; flex: 1 1 auto; }
.ta-listado .summary { margin: 0 4px 10px; color: #6b7280; font-size: .88rem; }
.ta-listado .summary b { color: #111827; }
.ta-listado .ta-chips { margin-bottom: 12px; }
.ta-listado > .ta-card.ta-solo-ancha { overflow-x: auto; }
.ta-tabla { width: 100%; border-collapse: collapse; font-size: .92rem; }
.ta-tabla th { padding: 11px 14px; border-bottom: 1px solid #e5e7eb; background: #f9fafb; color: #6b7280; font-size: .74rem; font-weight: 700; text-align: left; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.ta-tabla th a { color: inherit; text-decoration: none; }
.ta-tabla th a:hover { color: #c2410c; }
.ta-tabla th a.asc::after { content: " \2191"; color: #f97316; }
.ta-tabla th a.desc::after { content: " \2193"; color: #f97316; }
.ta-tabla td { padding: 12px 14px; border-bottom: 1px solid #f3f4f6; color: #374151; vertical-align: middle; }
.ta-tabla tbody tr:last-child td { border-bottom: 0; }
.ta-tabla tbody tr[data-href] { cursor: pointer; }
.ta-tabla tbody tr:hover td { background: #fff7ed; }
.ta-tabla tbody tr.nueva td:first-child { box-shadow: inset 3px 0 0 #f97316; }
.ta-tabla td small { display: block; margin-top: 2px; color: #6b7280; font-size: .8rem; }
.ta-tabla-titulo { color: #111827; font-weight: 600; text-decoration: none; }
.ta-tabla-titulo:hover { color: #c2410c; }
.ta-tabla-nada { color: #9ca3af; }
.ta-tabla .centro { text-align: center; }
.ta-tabla .acciones { width: 1%; text-align: right; white-space: nowrap; }
.ta-icono-btn { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 10px; color: #6b7280; font-size: 1.2rem; text-decoration: none; }
.ta-icono-btn:hover { background: #ffedd5; color: #c2410c; }
.ta-pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin: 4px 0 16px; padding: 0; list-style: none; }
.ta-pager li a, .ta-pager li span { display: inline-flex; align-items: center; justify-content: center; min-width: 38px; height: 38px; padding: 0 10px; border: 1px solid #e5e7eb; border-radius: 10px; background: #fff; color: #374151; font-size: .9rem; font-weight: 600; text-decoration: none; }
.ta-pager li a:hover { border-color: #fdba74; color: #c2410c; }
.ta-pager li.active a, .ta-pager li.active span { border-color: #f97316; background: #f97316; color: #fff; }
.ta-pager li.disabled span { color: #d1d5db; }
@media (min-width: 768px) {
    .ta-solo-ancha { display: block !important; }
    a.ta-solo-ancha, .ta-btn.ta-solo-ancha { display: inline-flex !important; }
    .ta-solo-angosta { display: none !important; }
    .ta-listado-barra > .ta-btn.en-celular { flex: 0 0 auto; }
    .ta-listado-filtros-pie .ta-btn { flex: 0 0 auto; }
}

/* Pantallas de lectura: un comunicado o un reporte, en el portal del tutor y en los
   detalles del personal (views/reportes/_detalle.php). */
/* Lectura de un comunicado: primero el título y el mensaje, sin marcos */
.ta-lectura-pagina { max-width: 680px; margin: 0 auto; }
.ta-volver { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; margin-bottom: 6px; padding: 0 4px; color: #6b7280; text-decoration: none; font-size: .92rem; font-weight: 600; }
.ta-volver:hover { color: #c2410c; }
.ta-volver i { font-size: 1.1rem; }
.ta-lectura-prioridad { display: flex; align-items: center; gap: 8px; padding: 10px 18px; font-size: .9rem; font-weight: 700; }
.ta-lectura-prioridad i { font-size: 1.15rem; }
.ta-lectura-prioridad.urgente { background: #dc2626; color: #fff; }
.ta-lectura-prioridad.importante { background: #ffedd5; color: #9a3412; }
.ta-lectura-cabeza { padding: 18px 18px 0; }
.ta-lectura-categoria { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600; }
.ta-lectura-titulo { margin: 10px 0 6px; font-size: 1.45rem; font-weight: 700; line-height: 1.25; color: #111827; }
.ta-lectura-meta { margin: 0; color: #6b7280; font-size: .88rem; line-height: 1.5; }
.ta-lectura-cuerpo { padding: 16px 18px 20px; font-size: 1.06rem; line-height: 1.65; color: #1f2937; overflow-wrap: anywhere; }
.ta-lectura-cuerpo a { color: #c2410c; font-weight: 600; }
.ta-lectura-adjunto { padding: 0 18px 18px; }
.ta-lectura-imagen { display: block; border: 1px solid #e5e7eb; border-radius: 12px; overflow: hidden; background: #f9fafb; }
.ta-lectura-imagen img { display: block; width: 100%; height: auto; }
.ta-lectura-descargar { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; margin-top: 4px; color: #6b7280; text-decoration: none; font-size: .88rem; font-weight: 600; }
.ta-lectura-descargar:hover { color: #c2410c; }
.ta-lectura-archivo { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid #e5e7eb; border-radius: 12px; text-decoration: none; color: inherit; }
.ta-lectura-archivo:hover { border-color: #fdba74; }
.ta-lectura-archivo-texto { flex: 1; min-width: 0; }
.ta-lectura-archivo-texto b { display: block; color: #111827; font-size: .95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ta-lectura-archivo-texto small { display: block; color: #6b7280; font-size: .82rem; }
.ta-lectura-pie { display: flex; align-items: center; gap: 6px; padding: 12px 18px; border-top: 1px solid #f3f4f6; color: #6b7280; font-size: .85rem; }
.ta-lectura-pie i { color: #16a34a; font-size: 1.1rem; }
@media (min-width: 768px) {
    .ta-lectura-cabeza { padding: 24px 28px 0; }
    .ta-lectura-titulo { font-size: 1.7rem; }
    .ta-lectura-cuerpo { padding: 18px 28px 26px; }
    .ta-lectura-adjunto { padding: 0 28px 24px; }
    .ta-lectura-prioridad, .ta-lectura-pie { padding-left: 28px; padding-right: 28px; }
}

/* Lectura de un reporte: datos (dónde, quién), acciones y una tarjeta por materia */
.ta-lectura-datos { display: grid; gap: 4px; padding: 4px 18px 14px; border-top: 1px solid #f3f4f6; }
.ta-dato { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.ta-dato > i { font-size: 1.35rem; color: #9ca3af; flex-shrink: 0; }
.ta-dato > span { flex: 1; min-width: 0; }
.ta-dato small { display: block; color: #6b7280; font-size: .78rem; }
.ta-dato b { display: block; color: #111827; font-size: .98rem; font-weight: 600; overflow-wrap: anywhere; }
.ta-dato.alto { align-items: flex-start; }
.ta-dato-texto { display: block; color: #1f2937; font-size: .98rem; line-height: 1.55; overflow-wrap: anywhere; }
.ta-dato-texto + .ta-dato-texto { margin-top: 4px; }
.ta-lectura-datos + .ta-lectura-acciones { padding-top: 4px; }
.ta-signos { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; padding: 0 18px 16px; }
.ta-signos > div { padding: 10px 12px; border-radius: 12px; background: #f0fdfa; text-align: center; }
.ta-signos b { display: block; color: #0f766e; font-size: 1.05rem; }
.ta-signos small { display: block; color: #6b7280; font-size: .76rem; }
.ta-nota { display: flex; gap: 10px; margin: 0 4px 16px; padding: 12px 14px; border-radius: 12px; background: #f5f3ff; color: #4c1d95; font-size: .9rem; line-height: 1.5; }
.ta-nota i { flex-shrink: 0; font-size: 1.25rem; color: #7c3aed; }
.ta-nota a { color: #6d28d9; font-weight: 700; }
.ta-sesion { display: flex; gap: 12px; padding: 14px 16px; border-bottom: 1px solid #f3f4f6; }
.ta-sesion:last-child { border-bottom: 0; }
.ta-sesion-numero { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 10px; background: #7c3aed1f; color: #6d28d9; font-weight: 700; font-size: .9rem; flex-shrink: 0; }
.ta-sesion-cuerpo { flex: 1; min-width: 0; }
.ta-sesion-cuerpo > b { display: block; color: #111827; font-size: .98rem; }
.ta-sesion-cuerpo > small { display: block; color: #6b7280; font-size: .82rem; }
.ta-sesion-acuerdos { margin-top: 8px; padding: 10px 12px; border-radius: 12px; background: #f9fafb; color: #1f2937; font-size: .95rem; line-height: 1.55; overflow-wrap: anywhere; }
.ta-sesion-acuerdos small { display: block; margin-bottom: 2px; color: #6b7280; font-size: .76rem; font-weight: 600; }
.ta-lectura-acciones { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 18px 18px; }
.ta-lectura-acciones .ta-btn { text-decoration: none; flex: 1 1 140px; }
.ta-materia-cabeza { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid #f3f4f6; }
.ta-materia-nombre { flex: 1; min-width: 0; }
.ta-materia-nombre b { display: block; color: #111827; font-size: 1.02rem; }
.ta-materia-nombre small { display: block; color: #6b7280; font-size: .84rem; }
.ta-materia-cabeza .ta-btn { min-width: 44px; padding: 8px 12px; text-decoration: none; }
.ta-materia-cabeza .ta-btn i { font-size: 1.15rem; }
.ta-materia-texto { padding: 14px 16px; font-size: 1rem; line-height: 1.6; color: #1f2937; overflow-wrap: anywhere; }
.ta-materia-recomendacion { margin: 0 16px 16px; padding: 12px 14px; border-radius: 12px; background: #fffbeb; color: #78350f; font-size: .96rem; line-height: 1.55; overflow-wrap: anywhere; }
.ta-materia-texto + .ta-materia-recomendacion { margin-top: -2px; }
.ta-materia-cabeza + .ta-materia-recomendacion { margin-top: 14px; }
.ta-materia-recomendacion b { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; color: #92400e; font-size: .84rem; }
.ta-materia-recomendacion b i { font-size: 1.1rem; }
@media (min-width: 768px) {
    .ta-lectura-datos { padding: 4px 28px 16px; }
    .ta-signos { padding: 0 28px 18px; }
    .ta-lectura-acciones { padding: 0 28px 24px; }
    .ta-lectura-acciones .ta-btn { flex: 0 0 auto; }
}

/* Detalle de un registro del personal (views/reportes/_detalle.php es el primero): el
   estado una vez arriba, Editar y "Más" junto al título, lo que toca hacer abajo */
.ta-detalle { max-width: 1160px; margin: 0 auto; }
.ta-detalle-lateral > .ta-menu-grupo:first-child { margin-top: 18px; }
.ta-estado { display: flex; align-items: flex-start; gap: 10px; padding: 12px 18px; font-size: .92rem; line-height: 1.45; }
.ta-estado > i { flex-shrink: 0; margin-top: 1px; font-size: 1.25rem; }
.ta-estado b { display: block; font-weight: 700; }
.ta-estado.aviso { background: #fffbeb; color: #78350f; }
.ta-estado.aviso > i { color: #d97706; }
.ta-estado.ok { background: #f0fdf4; color: #14532d; }
.ta-estado.ok > i { color: #16a34a; }
.ta-estado.urgente { background: #fef2f2; color: #7f1d1d; }
.ta-estado.urgente > i { color: #dc2626; }
.ta-estado.neutro { background: #f3f4f6; color: #374151; }
.ta-detalle-cabeza { display: flex; align-items: flex-start; gap: 12px; }
.ta-detalle-titulos { flex: 1; min-width: 0; }
.ta-detalle-folio { margin-left: 8px; color: #9ca3af; font-size: .82rem; font-weight: 600; }
.ta-detalle-herramientas { display: flex; flex-shrink: 0; gap: 2px; margin: -4px -8px 0 0; }
.ta-dato small + small, .ta-dato b + small { margin-top: 2px; }
.ta-btn.ta-btn-peligro { color: #b91c1c; border-color: #fecaca; }
.ta-btn.ta-btn-peligro:hover { background: #fef2f2; color: #991b1b; }
.ta-mas { position: relative; }
.ta-mas > summary { list-style: none; cursor: pointer; }
.ta-mas > summary::-webkit-details-marker { display: none; }
.ta-mas[open] > summary { background: #ffedd5; color: #c2410c; }
.ta-mas-menu { position: absolute; top: calc(100% + 6px); right: 0; z-index: 30; min-width: 220px; padding: 6px; border: 1px solid #e5e7eb; border-radius: 14px; background: #fff; box-shadow: 0 12px 32px rgba(17, 24, 39, .14); }
.ta-mas-item { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 12px; border-radius: 10px; color: #374151; font-size: .94rem; font-weight: 500; text-decoration: none; }
.ta-mas-item i { font-size: 1.2rem; }
.ta-mas-item:hover { background: #f3f4f6; color: #111827; }
.ta-mas-item.peligro { color: #b91c1c; }
.ta-mas-item.peligro:hover { background: #fef2f2; color: #991b1b; }
.ta-cifras { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 14px 16px; }
.ta-cifras > div { padding: 10px 8px; border-radius: 12px; background: #f9fafb; text-align: center; }
.ta-cifras b { display: block; font-size: 1.5rem; line-height: 1.1; }
.ta-cifras small { display: block; margin-top: 2px; color: #6b7280; font-size: .78rem; }
.ta-cifras + .ta-menu-item { border-top: 1px solid #f3f4f6; }
/* Cuatro cifras: dos por renglón en el celular, las cuatro juntas desde 640 px */
.ta-cifras.cuatro { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 640px) { .ta-cifras.cuatro { grid-template-columns: repeat(4, 1fr); } }
.ta-registro > summary { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 16px; color: #374151; font-size: .95rem; font-weight: 600; list-style: none; cursor: pointer; }
.ta-registro > summary::-webkit-details-marker { display: none; }
.ta-registro > summary > i:first-child { color: #9ca3af; font-size: 1.2rem; }
.ta-registro-flecha { margin-left: auto; color: #9ca3af; transition: transform .15s; }
.ta-registro[open] .ta-registro-flecha { transform: rotate(180deg); }
.ta-registro dl { display: grid; gap: 2px; margin: 0; padding: 0 16px 14px; }
.ta-registro dl > div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid #f3f4f6; font-size: .9rem; }
.ta-registro dt { color: #6b7280; }
.ta-registro dd { margin: 0; color: #111827; font-weight: 600; text-align: right; }
@media (min-width: 768px) {
    .ta-estado { padding-left: 28px; padding-right: 28px; }
}
/* Tableta y escritorio: el registro a la izquierda, lo que sirve para decidir (historial, datos) a la derecha y a la vista */
@media (min-width: 768px) {
    .ta-detalle-grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 16px; align-items: start; }
    .ta-detalle-lateral { position: sticky; top: 16px; }
    .ta-detalle-lateral > .ta-menu-grupo:first-child { margin-top: 0; }
    .ta-detalle-lateral .ta-cifras { gap: 6px; padding: 12px; }
    .ta-detalle-lateral .ta-cifras > div { padding: 10px 4px; }
    .ta-detalle-lateral .ta-cifras small { font-size: .7rem; }
    .ta-detalle-lateral .ta-registro dl > div { flex-direction: column; gap: 2px; }
    .ta-detalle-lateral .ta-registro dd { text-align: left; }
}
@media (min-width: 1024px) {
    .ta-detalle-grid { grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; }
    .ta-detalle-lateral .ta-cifras { gap: 8px; }
    .ta-detalle-lateral .ta-cifras > div { padding: 10px 8px; }
    .ta-detalle-lateral .ta-cifras small { font-size: .78rem; }
}

/* Columna de una pantalla sencilla (perfiles, listas del tutor) */
.ta-pagina { max-width: 680px; margin: 0 auto; }
/* La misma, con lugar para una columna lateral desde 768 px (actividad) */
@media (min-width: 768px) {
    .ta-pagina.ancha { max-width: 1160px; }
    /* Con el ancho, las cifras (p. ej. una por módulo en la línea de tiempo) van en una fila */
    .ta-pagina.ancha .ta-cifras { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }
}

/* Actividad (views/site/_actividad-lista.php): en el celular, el resumen, las fichas y la
   lista una debajo de otra; desde 768 px la lista a la izquierda y los filtros en una
   columna lateral fija, con el nombre de cada grupo y las fichas en varias líneas */
.ta-actividad-filtros .ta-chips::before { display: none; }
@media (min-width: 768px) {
    .ta-actividad { display: grid; grid-template-columns: minmax(0, 1fr) 280px; grid-template-areas: "resumen filtros" "lista filtros"; grid-template-rows: auto 1fr; gap: 0 16px; align-items: start; }
    .ta-actividad > .ta-actividad-resumen { grid-area: resumen; }
    .ta-actividad > .ta-actividad-lista { grid-area: lista; min-width: 0; }
    .ta-actividad > .ta-actividad-filtros { grid-area: filtros; position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; padding: 16px; border: 1px solid #e5e7eb; border-radius: 16px; background: #fff; }
    .ta-actividad-filtros .ta-chips { flex-wrap: wrap; overflow: visible; gap: 6px; margin: 0 0 16px; padding: 0; }
    .ta-actividad-filtros .ta-chips:last-child { margin-bottom: 0; }
    .ta-actividad-filtros .ta-chips + .ta-chips { margin-top: 0; }
    .ta-actividad-filtros .ta-chips::before { content: attr(data-titulo); display: block; flex-basis: 100%; margin-bottom: 2px; color: #6b7280; font-size: .74rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
    .ta-actividad-filtros .ta-chip { min-height: 36px; padding: 0 12px; font-size: .88rem; }
}
@media (min-width: 1024px) {
    .ta-actividad { grid-template-columns: minmax(0, 1fr) 340px; gap: 0 24px; }
}

/* El aviso de "guardado" (o del error) arriba de la pantalla, al ancho del contenido */
.ta-contenido > .alert { max-width: 680px; margin: 0 auto 14px; font-size: .95rem; line-height: 1.45; }
.ta-contenido > .alert .btn-close { display: none; }

/* Formularios de los portales: un campo por renglón, etiqueta arriba y letra de 16px (iOS no hace zoom) */
.ta-form { padding: 2px 16px 16px; }
.ta-campo { display: block; margin-top: 14px; }
.ta-campo > label, .ta-campo-etiqueta { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; color: #374151; font-size: .88rem; font-weight: 600; }
.ta-campo input[type=text], .ta-campo input[type=email], .ta-campo input[type=tel], .ta-campo input[type=password], .ta-campo input[type=date], .ta-campo input[type=time], .ta-campo select, .ta-campo textarea {
    display: block; width: 100%; min-height: 48px; padding: 11px 12px; border: 1px solid #d1d5db; border-radius: 12px; background: #fff; color: #111827;
    font: inherit; font-size: 16px; line-height: 1.4; box-shadow: none; -webkit-appearance: none; appearance: none; }
.ta-campo select { padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%236b7280' viewBox='0 0 256 256'%3E%3Cpath d='M213.66 101.66l-80 80a8 8 0 0 1-11.32 0l-80-80a8 8 0 0 1 11.32-11.32L128 164.69l74.34-74.35a8 8 0 0 1 11.32 11.32z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.ta-campo textarea { min-height: 84px; resize: vertical; }
.ta-campo input:focus, .ta-campo select:focus, .ta-campo textarea:focus { outline: 0; border-color: #f97316; box-shadow: 0 0 0 3px #f9731626; }
.ta-campo input::placeholder, .ta-campo textarea::placeholder { color: #9ca3af; }
.ta-campo.has-error input, .ta-campo.has-error select, .ta-campo.has-error textarea { border-color: #dc2626; }
.ta-campo-ayuda { display: block; margin-top: 6px; color: #6b7280; font-size: .82rem; line-height: 1.4; }
.ta-campo-error { display: block; margin-top: 6px; color: #b91c1c; font-size: .82rem; font-weight: 600; }
.ta-campo-error:empty, .ta-campo-ayuda:empty { display: none; }
.ta-campos-2 { display: grid; grid-template-columns: 1fr; gap: 0 14px; }
.ta-falta { display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 999px; background: #fef3c7; color: #92400e; font-size: .7rem; font-weight: 700; }
.ta-casilla { display: flex; align-items: center; gap: 10px; min-height: 44px; margin: 8px 0 0; color: #374151; font-size: .95rem; font-weight: 500; cursor: pointer; }
.ta-casilla input { width: 20px; height: 20px; margin: 0; flex-shrink: 0; accent-color: #f97316; }
.ta-opciones { display: flex; flex-wrap: wrap; gap: 8px; }
.ta-opciones label { position: relative; margin: 0; cursor: pointer; }
.ta-opciones input { position: absolute; opacity: 0; pointer-events: none; }
.ta-opciones span { display: inline-flex; align-items: center; justify-content: center; min-width: 56px; min-height: 44px; padding: 0 14px; border: 1px solid #d1d5db; border-radius: 12px; background: #fff; color: #374151; font-weight: 700; font-size: .95rem; }
.ta-opciones input:checked + span { border-color: #f97316; background: #fff7ed; color: #9a3412; }
.ta-opciones input:focus-visible + span { box-shadow: 0 0 0 3px #f9731626; }
.ta-form-acciones { padding-top: 18px; }
.ta-btn.grande { width: 100%; min-height: 50px; border-radius: 14px; font-size: 1rem; }
.ta-clave { position: relative; display: block; }
.ta-campo .ta-clave input { padding-right: 52px; }
.ta-clave button { position: absolute; top: 4px; right: 4px; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 0; border-radius: 10px; background: none; color: #6b7280; font-size: 1.3rem; cursor: pointer; }
.ta-clave button:hover { color: #111827; }
@media (min-width: 640px) {
    .ta-campos-2 { grid-template-columns: 1fr 1fr; }
}

/* Avisos en este teléfono (views/site/_push-card.php, estilo "app"; push.js escribe el estado) */
.ta-avisos { padding: 14px 16px 16px; }
.ta-avisos-estado { display: flex; align-items: center; gap: 12px; }
.ta-avisos #push-status { margin: 0; color: #111827; font-size: .98rem; font-weight: 600; }
.ta-avisos #push-hint { margin: 2px 0 0; color: #6b7280; font-size: .84rem; line-height: 1.4; }
.ta-avisos #push-hint:empty, .ta-avisos #push-msg:empty { display: none; }
.ta-avisos-botones { display: grid; gap: 8px; margin-top: 12px; }
.ta-avisos-botones:not(:has(button:not([hidden]))) { display: none; }
.ta-avisos #push-msg { margin: 10px 0 0; font-size: .84rem; }
.ta-campo input:disabled { background: #f9fafb; color: #6b7280; cursor: not-allowed; }

/* Botones que se ven como enlaces del menú "Más", iconos o fichas */
button.ta-mas-item { width: 100%; border: 0; background: none; font: inherit; text-align: left; cursor: pointer; }
button.ta-icono-btn { border: 0; background: none; font: inherit; cursor: pointer; }
button.ta-chip { font: inherit; }
