/* Tasca — estilos propios sobre BCA (prefijo tsc_). El tema de color es el de BCA. */

body { padding: 0 1em 2em; }
body.tsc_sin_sesion { margin-top: 0; }
body.tsc_sin_sesion .bca_apmenu { display: none; }
body:not(.tsc_admin) .tsc_solo_admin { display: none; }

h2 { margin: .4em 0; }
h3 { margin: 0 0 .3em; font-size: 110%; }
h4 { margin: 1em 0 .3em; font-size: 95%; color: #555; }
a { color: #C40; }

/* ---- Menú ---- */
.bca_apm_bar { gap: 2px; }
.bca_apm_elem.tsc_activo { background-color: #F60; color: #000; }
@media (min-width: 600px) {
  /* El logo y la barra en una fila; la barra ocupa lo que deje el logo, sea cual sea su ancho. */
  .bca_apmenu { display: flex; align-items: center; }
  .bca_apm_bar { flex: 1; min-width: 0; align-items: center; }
  .tsc_menu_ayuda { margin-left: auto; }
  .tsc_menu_usuario .bca_apm_subm { right: 15px; }
}

/* ---- Utilidades ---- */
.tsc_ancho { width: calc(100% - 16px); }            /* .bca_in usa content-box: se descuentan borde (2), relleno (10) y margen (4). */
.tsc_ayuda { color: #777; font-size: 90%; }
.tsc_ayuda.tsc_aviso_texto { color: #a15c00; }
#d_perfil [data-accion="probar-correo"] { margin-left: 1em; vertical-align: middle; }
#fpf_push { display: flex; align-items: center; gap: .5em; flex-wrap: wrap; }
.tsc_izq { float: left; }
.tsc_peligro, .tsc_peligro:hover { background-color: #B22; }
.tsc_icono { cursor: pointer; color: #888; margin-left: .3em; }
.tsc_icono:hover { color: #F60; }
.tsc_enlace { cursor: pointer; text-decoration: underline; }
.tsc_texto { white-space: pre-wrap; word-break: break-word; margin: .3em 0; }
.tsc_vacio { text-align: center; color: #999; padding: 3em 1em; grid-column: 1 / -1; }
.tsc_desborde { overflow-x: auto; }
.tsc_inactivo { color: #999; font-style: italic; }

/* ---- Cabecera de vista ---- */
.tsc_cabecera { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5em; }
.tsc_herramientas { display: flex; flex-wrap: wrap; align-items: center; gap: .3em; }

/* ---- Login: tarjeta centrada con saludo sobre fondo ámbar suave (el de la jarra) ---- */
body.tsc_sin_sesion { background: #FAEEDA; padding: 0; } /* Sin el relleno de BCA: la tarjeta ya tiene su margen. */
#v_login:not(.bca_oculto), #v_invitacion:not(.bca_oculto) { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; box-sizing: border-box; }
.tsc_login { width: 100%; max-width: 360px; background: #FFF; border-radius: 16px; padding: 28px; box-sizing: border-box;
             box-shadow: 0 1px 2px rgba(65, 36, 2, .08), 0 8px 24px rgba(65, 36, 2, .10); text-align: center; }
.tsc_login_logo { width: 64px; height: 64px; display: block; margin: 0 auto 12px; }
.tsc_login h1 { margin: 0; font-size: 150%; font-weight: bold; color: #2C2C2A; }
.tsc_login_sub { margin: 4px 0 20px; color: #6B6A64; }
.tsc_login .tsc_form { text-align: left; }
/* Verificación en dos pasos */
.tsc_codigo { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 120%; letter-spacing: .15em; max-width: 14em; }
.tsc_qr { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin: 8px 0 12px; }
.tsc_qr svg { width: 180px; height: 180px; flex: none; border: solid 1px #EEE; }
.tsc_clave { font-family: ui-monospace, Menlo, Consolas, monospace; word-break: break-all; background: #F6F6F4; padding: 2px 6px; }
.tsc_codigos_rec { columns: 2; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 110%; margin: 8px 0; padding-left: 2em; }
.tsc_codigos_rec li { margin: 2px 0; }
.tsc_enlace_invitacion { word-break: break-all; }
#tsc_invitaciones { margin-top: 24px; }
.tsc_login_pie { margin: 16px 0 0; font-size: 90%; }
.tsc_login_pie a { color: #854F0B; }
#v_invitacion .bca_panel { margin-bottom: 8px; }
.tsc_login_entrar { width: 100%; height: 36px; font-size: 105%; margin-top: 6px; }
/* El ámbar de la jarra, con texto oscuro (el rojo de BCA desentona sobre este fondo). */
.tsc_login .bca_btn.tsc_login_entrar { background: #F5A623; border-color: #F5A623; color: #412402; font-weight: bold; }
.tsc_login .bca_btn.tsc_login_entrar:hover, .tsc_login .bca_btn.tsc_login_entrar:focus-visible { background: #E59512; border-color: #E59512; }

/* ---- Formularios ---- */
/* BCA deja los campos en 9pt y 2px de relleno (≈20px): se igualan a la altura de los botones (28px).
   Relleno horizontal 5px: los anchos calc(100% - 16px) descuentan relleno, borde y margen. */
.bca_in:is(input:not([type=checkbox], [type=radio], [type=color], [type=file], [type=range]), select):not(.bca_t_xs, .bca_t_s) {
  font-size: 14px; line-height: 18px; padding: 4px 5px;
}
select.bca_in:not(.bca_t_xs, .bca_t_s) { height: 18px; }   /* content-box: 18 + 2·4 + 2 = 28px */
textarea.bca_in { font-size: 14px; padding: 4px 5px; }
.tsc_form .tsc_campo { margin: 0 0 .6em; }
.tsc_form label.bca_in { display: block; margin: 0 2px; }
.tsc_form input.bca_in:not([type=checkbox]):not([type=color]):not(.tsc_hora),
.tsc_form select.bca_in, .tsc_form textarea.bca_in { width: calc(100% - 16px); }
.tsc_form textarea.bca_in { resize: vertical; }
.tsc_fila_campos { display: flex; gap: 1em; flex-wrap: wrap; }
.tsc_fila_campos > .tsc_campo { flex: 1 1 12em; }
.tsc_campo input[type=date] { width: auto !important; }
.tsc_hora { width: 6em; }
.tsc_color { width: 2.5em; height: 1.6em; padding: 0 !important; vertical-align: middle; cursor: pointer; }
.tsc_invalido { border-color: #D00 !important; background-color: #FEE !important; }
.tsc_msg_err { color: #C00; font-size: 90%; margin: 0 2px; }

/* ---- Tareas: lateral ---- */
.tsc_con_lateral { display: flex; gap: 1.5em; align-items: flex-start; }
.tsc_lateral { flex: 0 0 15em; position: sticky; top: 4.5rem; }
.tsc_contenido { flex: 1 1 auto; min-width: 0; }
.tsc_filtro { display: flex; align-items: center; gap: .4em; padding: 3px 6px; border-radius: 3px; color: inherit; text-decoration: none; }
.tsc_filtro:hover { background-color: #FFE7D6; }
.tsc_filtro.tsc_activo { background-color: #FFD2B0; font-weight: bold; }
.tsc_punto { display: inline-block; width: .7em; height: .7em; border-radius: 50%; flex: none; }
.tsc_contador { margin-left: auto; color: #777; font-size: 85%; }
@media (max-width: 599px) {
  .tsc_con_lateral { display: block; }
  .tsc_lateral { display: none; position: static; }
  .tsc_lateral.tsc_abierto { display: block; border-bottom: solid 1px #DDD; padding-bottom: .5em; }
}

/* ---- Tareas: lista ---- */
#f_tarea_rapida { margin: .3em 0 .8em; }
#f_tarea_rapida .bca_in { font-size: 11pt; padding: 5px; }
.tsc_tarea { display: flex; align-items: flex-start; gap: .5em; padding: 6px 4px; border-bottom: solid 1px #EEE; cursor: pointer; }
.tsc_tarea:hover { background-color: #FFF6EE; }
.tsc_tarea.tsc_subtarea { margin-left: 2em; }
.tsc_tarea .tsc_check { margin-top: .25em; cursor: pointer; width: 1.1em; height: 1.1em; }
.tsc_tarea_cuerpo { flex: 1; min-width: 0; }
.tsc_tarea_titulo { word-break: break-word; }
.tsc_tarea_meta { font-size: 85%; color: #666; display: flex; flex-wrap: wrap; gap: .3em .7em; align-items: center; margin-top: 2px; }
.tsc_hecha .tsc_tarea_titulo, .tsc_hecha > a { text-decoration: line-through; color: #999; }
.tsc_prio { flex: none; width: 4px; align-self: stretch; border-radius: 2px; }
.tsc_prio_1 { background-color: #69C; }
.tsc_prio_2 { background-color: #F90; }
.tsc_prio_3 { background-color: #D22; }
.tsc_vencida { color: #C00; font-weight: bold; }
.tsc_para_hoy { color: #D60; font-weight: bold; }
.tsc_en_curso { color: #06A; }
.tsc_chip_proy { border-left: solid 4px; padding-left: 4px; }

/* ---- Diálogo de tarea ---- */
.tsc_sel_etiquetas { display: flex; flex-wrap: wrap; gap: .3em .8em; margin: 2px; }
.tsc_opc_etiq { cursor: pointer; white-space: nowrap; }
.tsc_madre { margin-bottom: .6em; color: #555; }
.tsc_subtareas { border-top: solid 1px #DDD; margin-top: .5em; }
.tsc_subtarea_fila { display: flex; align-items: center; gap: .5em; padding: 2px 0; }

/* ---- Tarjetas (proyectos y notas) ---- */
.tsc_rejilla { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1em; margin-top: .5em; }
.tsc_tarjeta { border-top: solid 4px #DDD; display: flex; flex-direction: column; }
.tsc_tarjeta.tsc_archivado { opacity: .65; }
.tsc_tarjeta .tsc_acciones { margin-top: auto; padding-top: .5em; }
.tsc_nota { cursor: pointer; border-top-color: #FC6; }
.tsc_nota:hover { background-color: #FFFCF2; }
.tsc_nota .tsc_texto { max-height: 9em; overflow: hidden; color: #333; }
.tsc_fijada { color: #F60; }

/* ---- Etiquetas ---- */
.tsc_etiqueta_edit { display: flex; align-items: center; gap: .3em; margin: 2px 0; }
.tsc_etiqueta_edit input[name=name] { flex: 1; }
.tsc_etiqueta_edit select.tsc_etiq_cat { width: 9em; flex: none; }
#f_etiqueta_nueva { border-top: solid 1px #DDD; margin-top: .6em; padding-top: .6em; }

/* ---- Agenda ---- */
.tsc_mes { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-left: solid 1px #DDD; border-top: solid 1px #DDD; }
.tsc_mes_cab { background-color: #333; color: #FFF; text-align: center; font-size: 90%; padding: 2px; }
.tsc_dia { border-right: solid 1px #DDD; border-bottom: solid 1px #DDD; min-height: 6.5em; padding: 2px; cursor: pointer; overflow: hidden; }
.tsc_dia:hover { background-color: #FFF6EE; }
.tsc_dia.tsc_fuera { background-color: #F6F6F6; color: #AAA; }
.tsc_dia_num { font-size: 85%; text-align: right; }
.tsc_dia.tsc_hoy .tsc_dia_num { font-weight: bold; color: #FFF; background-color: #F60; border-radius: 3px; float: right; padding: 0 5px; }
.tsc_ev { font-size: 80%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-radius: 3px;
  padding: 1px 4px; margin: 1px 0; background-color: #FFE0C8; color: #000; clear: both; cursor: pointer; }
.tsc_ev:hover { filter: brightness(.95); }
.tsc_ev_dia { background-color: #F60; color: #FFF; }
.tsc_ev_hora { font-weight: bold; }
.tsc_ev_tarea { background-color: transparent; border: solid 1px #DDD; }
.tsc_lista_dia { margin-bottom: 1em; }
.tsc_lista_dia h4 { border-bottom: solid 1px #DDD; }
.tsc_lista_dia h4::first-letter { text-transform: uppercase; }
.tsc_lista_dia.tsc_hoy h4 { color: #F60; }
.tsc_lista_dia .tsc_ev { font-size: 100%; white-space: normal; padding: 4px 6px; }

/* ---- iCalendar: repeticiones, suscripciones y conexiones ---- */
.tsc_ev_icono { font-size: 85%; margin-right: 3px; opacity: .7; }
.tsc_ev_sub { background-color: color-mix(in srgb, var(--tsc-sub) 22%, #FFF); border-left: solid 3px var(--tsc-sub); }
.tsc_ev_sub.tsc_ev_dia { background-color: var(--tsc-sub); color: #FFF; }
.tsc_form input.bca_in.tsc_num { width: 4em !important; }
.tsc_form select.bca_in.tsc_corto { width: auto; }
.tsc_campo_estrecho { flex: 0 0 auto !important; }
.tsc_bloque { border-top: solid 1px #DDD; margin-top: .8em; }
.tsc_fila_lista { display: flex; align-items: center; gap: .6em; padding: 6px 0; border-bottom: solid 1px #EEE; }
.tsc_fila_cuerpo { flex: 1; min-width: 0; }
.tsc_url { word-break: break-all; }
.tsc_secreto { font-family: monospace; font-size: 150%; letter-spacing: .08em; text-align: center; user-select: all; }
.tsc_datos th { text-align: left; padding-right: 1em; vertical-align: top; }
.tsc_datos code, .tsc_fila_lista code { background: #F4F4F4; padding: 1px 4px; border-radius: 3px; }
.bca_pes_area > input[type="radio"] + label + div { padding: .8em; }

/* ---- Ayuda en línea ---- */
.tsc_ayuda_enlace { font-size: 65%; vertical-align: middle; margin-left: .4em; }

/* ---- Categorías: contexto activo ---- */
.tsc_menu_contexto { border: solid 1px #666; border-radius: 3px; margin-right: .6em; white-space: nowrap; }
.tsc_menu_contexto .tsc_punto { vertical-align: middle; }
.tsc_punto_todo { background: transparent !important; border: dashed 1px #999; box-sizing: border-box; }
body.tsc_con_contexto .bca_apmenu { border-bottom: solid 4px var(--tsc-ctx); }
.bca_apm_subelem.tsc_activo { font-weight: bold; }
.bca_apm_subelem .tsc_punto { display: inline-block; vertical-align: middle; margin-right: 4px; }
.tsc_ctx_gestion { border-top: solid 1px #DDD; margin-top: 3px; padding-top: 5px !important; }
.tsc_grupo_cab { grid-column: 1 / -1; margin: .6em 0 0; display: flex; align-items: center; gap: .4em; }
.tsc_ctx_movil { color: #FFF; text-decoration: none; margin-left: .8em; font-size: 95%; white-space: nowrap; }
.tsc_ctx_movil .tsc_punto { vertical-align: middle; }

/* ---- Logotipo (jarra) ---- */
.tsc_logo { height: 1.5em; vertical-align: -0.4em; margin-right: 2px; }

/* ---- Contactos ---- */
.tsc_avatar { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 2.4em; height: 2.4em;
  border-radius: 50%; color: #FFF; font-weight: bold; font-size: 95%; object-fit: cover; }
.tsc_avatar_mini { width: 1.6em; height: 1.6em; font-size: 70%; }
.tsc_avatar_grande { width: 4.5em; height: 4.5em; font-size: 150%; }
#tsc_avatar_usuario .tsc_avatar { vertical-align: middle; margin-top: -2px; }
.tsc_perfil_avatar { display: flex; align-items: center; gap: 14px; }
.tsc_perfil_avatar .tsc_opcion { display: block; margin: 2px 0; }
.tsc_perfil_avatar_botones { display: inline-flex; gap: 4px; margin: 0 0 4px 1.6em; }
.tsc_letra { margin: .8em 0 .2em; color: #999; border-bottom: solid 1px #EEE; }
.tsc_contacto { display: flex; align-items: center; gap: .7em; padding: 6px 4px; border-bottom: solid 1px #F2F2F2; cursor: pointer; }
.tsc_contacto:hover { background-color: #FFF6EE; }
.tsc_contacto_cuerpo { flex: 1; min-width: 0; }
.tsc_contacto_nombre { font-weight: bold; }
.tsc_contacto_acciones { display: flex; gap: .6em; font-size: 115%; }
.tsc_contacto_acciones a { color: #888; }
.tsc_contacto_acciones a:hover { color: #F60; }
.tsc_contacto_cab { display: flex; align-items: center; gap: 1em; margin-bottom: .6em; }
.tsc_contacto_foto { display: flex; flex-wrap: wrap; align-items: center; gap: .3em; }
.tsc_fila_item { display: flex; align-items: center; gap: .3em; margin: 2px 0; }
.tsc_form .tsc_fila_item select.bca_in.tsc_etq { width: 8.5em !important; flex: none; }
.tsc_form .tsc_fila_item input.bca_in.tsc_etq_libre { width: 7em !important; flex: none; }
.tsc_fila_enlaces { display: flex; gap: .5em; flex: none; }
.tsc_fila_enlaces:empty { display: none; }
.tsc_fila_enlaces a { color: #888; }
.tsc_fila_enlaces a:hover { color: #F60; }
.tsc_contacto_acciones a.tsc_whatsapp:hover, .tsc_fila_enlaces a.tsc_whatsapp:hover { color: #25D366; }
.tsc_form .tsc_fila_item input.bca_in.tsc_val { flex: 1; width: auto !important; min-width: 0; }
.tsc_fila_dir { align-items: flex-start; }
.tsc_dir { flex: 1; display: grid; grid-template-columns: 6em 1fr; gap: 2px; }
.tsc_form .tsc_dir input.bca_in { width: calc(100% - 16px) !important; }
.tsc_dir [data-parte="street"] { grid-column: 1 / -1; }
.tsc_anadir { font-size: 90%; margin-left: 2px; }
.tsc_mas_campos { margin: .4em 0 .8em; }
.tsc_mas_campos summary { cursor: pointer; color: #C40; font-size: 90%; }
.tsc_vinculo { margin-bottom: .5em; }
.tsc_vinculo b { display: block; font-size: 90%; color: #555; }
.tsc_vinc { display: block; padding: 1px 0; text-decoration: none; }
.tsc_persona_proyecto .tsc_rol { flex: 1; }
.tsc_persona_proyecto .tsc_enlace { flex: 0 1 auto; white-space: nowrap; }
/* Selector de personas */
.tsc_selector_contactos { margin: 2px; }
.tsc_chips { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 3px; }
.tsc_chip_persona { display: inline-flex; align-items: center; gap: 4px; background: #EEF2FA; border: solid 1px #C9D4EC; border-radius: 12px; padding: 0 8px; font-size: 90%; }
.tsc_chip_persona .tsc_quitar { cursor: pointer; color: #888; font-weight: bold; }
.tsc_chip_mini { font-size: 100%; padding: 0 6px; }
.tsc_sel_entrada { position: relative; }
.tsc_sugerencias { position: absolute; z-index: 60; left: 2px; right: 2px; background: #FFF; border: solid 1px #CCC; border-radius: 3px;
  box-shadow: 0 3px 6px rgba(0,0,0,.2); max-height: 16em; overflow-y: auto; }
.tsc_sugerencia { display: flex; align-items: center; gap: .5em; padding: 4px 6px; cursor: pointer; color: inherit; text-decoration: none; }
.tsc_sugerencia:hover { background-color: #FFF0E3; }
.tsc_crear { color: #C40; border-top: solid 1px #EEE; }
/* Cumpleaños en la agenda */
.tsc_ev_cumple { background-color: #FCE4EC; color: #880E4F; }
.tsc_selector_contactos .tsc_sel_entrada input.bca_in { width: calc(100% - 16px); }

/* ---- Tareas: tablero (kanban) ---- */
#v_tareas:not(.tsc_modo_tablero) .tsc_solo_tablero, #v_tareas.tsc_modo_tablero .tsc_solo_lista { display: none !important; }
.tsc_conmutador { display: inline-flex; }
.tsc_conmutador .bca_btn { margin: 2px 0; border-radius: 0; }
.tsc_conmutador .bca_btn:first-child { border-radius: 5px 0 0 5px; }
.tsc_conmutador .bca_btn:last-child { border-radius: 0 5px 5px 0; }
.tsc_conmutador .bca_btn:not(.tsc_activo) { background-color: #DDD; color: #333; text-shadow: none; }
.tsc_tablero { display: flex; gap: .8em; align-items: flex-start; overflow-x: auto; padding: .3em 0 .8em; }
.tsc_columna { flex: 1 0 15em; max-width: 26em; background-color: #F3F3F3; border-radius: 6px; padding: 6px; transition: background-color .15s; }
.tsc_columna.tsc_sobre { background-color: #FFE9D6; }
.tsc_col_cab { display: flex; align-items: center; gap: .4em; font-weight: bold; padding: 2px 4px 6px; }
.tsc_col_cab .tsc_contador { margin-left: auto; font-weight: normal; }
.tsc_col_cuerpo { display: flex; flex-direction: column; gap: 6px; min-height: 3em; }
.tsc_tarjeta_k { background-color: #FFF; border-radius: 4px; border-left: solid 4px #DDD; padding: 6px 8px;
  box-shadow: 0 1px 2px rgba(0,0,0,.15); cursor: grab; }
.tsc_tarjeta_k:hover { box-shadow: 0 2px 5px rgba(0,0,0,.2); }
.tsc_kprio_1 { border-left-color: #69C; }
.tsc_kprio_2 { border-left-color: #F90; }
.tsc_kprio_3 { border-left-color: #D22; }
.tsc_k_titulo { word-break: break-word; }
.tsc_hecha_k .tsc_k_titulo { text-decoration: line-through; color: #999; }
.tsc_arrastrando { opacity: .35; }
.tsc_hueco { border: dashed 2px #F60; border-radius: 4px; background-color: #FFF3E8; }
.tsc_k_mover { display: flex; justify-content: space-between; margin-top: 4px; font-size: 80%; }
.tsc_k_mover a { color: #999; cursor: pointer; padding: 2px 0; }
.tsc_k_mover a:hover { color: #F60; }
/* Con ratón, los botones de mover solo aparecen al pasar por encima; en pantallas táctiles, siempre. */
@media (hover: hover) and (pointer: fine) {
  .tsc_k_mover { visibility: hidden; }
  .tsc_tarjeta_k:hover .tsc_k_mover { visibility: visible; }
}
.tsc_col_nueva { margin-top: 6px; }
.tsc_col_nueva input.bca_in { width: calc(100% - 16px); background: transparent; border-style: dashed; }
.tsc_col_nueva input.bca_in:focus { background: #FFF; border-style: solid; }
.tsc_col_mas { display: block; margin: 6px 4px 0; }
@media (max-width: 599px) {
  .tsc_tablero { scroll-snap-type: x mandatory; }
  .tsc_columna { flex: 0 0 85%; scroll-snap-align: start; }
}

/* ---- Notas: archivos adjuntos ---- */
.tsc_adjuntos { display: flex; flex-direction: column; gap: 4px; margin: 2px; }
.tsc_adjunto { display: flex; align-items: center; gap: .6em; padding: 4px 6px; border: solid 1px #EEE; border-radius: 4px; }
.tsc_adjunto:hover { background-color: #FFF6EE; }
.tsc_adj_cuerpo { flex: 1; min-width: 0; }
.tsc_adj_cuerpo .tsc_enlace { word-break: break-all; }
.tsc_adj_icono { font-size: 180%; color: #888; width: 1.3em; text-align: center; }
.tsc_miniatura { width: 2.6em; height: 2.6em; object-fit: cover; border-radius: 3px; border: solid 1px #DDD; }
.tsc_zona_subida { margin: 4px 2px; padding: .8em; border: dashed 2px #CCC; border-radius: 4px; text-align: center; color: #777; }
.tsc_zona_subida.tsc_sobre { border-color: #F60; background-color: #FFF3E8; }
.tsc_progreso { display: flex; align-items: center; gap: .5em; margin: 2px; }
.tsc_progreso progress { flex: 1; accent-color: #F60; }

/* ---- Vista general de un proyecto ---- */
.tsc_py_cab { border-left: solid 6px var(--py-color, #999); padding: .2em 0 .4em .8em; margin-bottom: 1em; }
.tsc_py_nombre { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5em; }
.tsc_py_nombre h2 { display: flex; flex-wrap: wrap; align-items: center; gap: .4em; }
.tsc_py_desc { color: #555; margin: .2em 0 .4em; }
.tsc_py_cifras { display: flex; flex-wrap: wrap; gap: .4em 1.2em; font-size: 92%; color: #555; }
.tsc_chip_cat { display: inline-flex; align-items: center; gap: .3em; font-size: 55%; font-weight: normal; border: solid 1px #DDD; border-radius: 10px; padding: 1px 8px; }
.tsc_py_rejilla { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 1em; align-items: start; }
.tsc_py_col { display: flex; flex-direction: column; gap: 1em; min-width: 0; }
.tsc_py_bloque { padding: 10px 12px; }
.tsc_py_titulo { display: flex; justify-content: space-between; align-items: center; gap: .5em; margin-bottom: .4em; }
.tsc_py_titulo h3 { margin: 0; }
.tsc_py_barra { height: 8px; background: #EEE; border-radius: 4px; overflow: hidden; margin: .2em 0; }
.tsc_py_barra span { display: block; height: 100%; background: #4CAF50; }
#f_py_tarea { margin: .5em 0; }
.tsc_py_mas { display: block; margin-top: .4em; }
.tsc_py_notas { display: grid; grid-template-columns: repeat(auto-fill, minmax(12em, 1fr)); gap: .5em; }
.tsc_py_nota { border: solid 1px #EEE; border-top: solid 3px #FC6; border-radius: 4px; padding: 6px 8px; cursor: pointer; }
.tsc_py_nota:hover { background-color: #FFFCF2; }
.tsc_py_nota_titulo { font-weight: bold; word-break: break-word; }
.tsc_py_notas .tsc_py_mas { grid-column: 1 / -1; }
.tsc_py_mes_cab { display: flex; justify-content: space-between; align-items: center; margin: .2em 0 .4em; }
.tsc_py_mes { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; font-size: 90%; }
.tsc_py_mes_cab_d, .tsc_py_mes > .tsc_py_mes_cab { color: #999; font-size: 85%; }
.tsc_py_dia { display: flex; flex-direction: column; align-items: center; padding: 3px 0 2px; border-radius: 4px; cursor: pointer; color: inherit; text-decoration: none; min-height: 2.2em; }
.tsc_py_dia:hover { background-color: #FFF0E3; }
.tsc_py_dia.tsc_fuera { color: #BBB; }
.tsc_py_dia.tsc_con_algo { font-weight: bold; }
.tsc_py_dia.tsc_hoy > span:first-child { background: #F60; color: #FFF; border-radius: 3px; padding: 0 4px; }
.tsc_py_dia.tsc_elegido { background-color: #FFD2B0; }
.tsc_py_marcas { display: flex; gap: 2px; height: 6px; }
.tsc_marca_ev, .tsc_marca_ta { display: inline-block; width: 6px; height: 6px; border-radius: 50%; }
.tsc_marca_ev { background: #F60; }
.tsc_marca_ta { border: solid 1.5px #3366CC; box-sizing: border-box; }
.tsc_py_item { display: flex; align-items: flex-start; gap: .5em; padding: 4px 2px; border-bottom: solid 1px #F2F2F2; cursor: pointer; color: inherit; text-decoration: none; }
.tsc_py_item:hover { background-color: #FFF6EE; }
.tsc_py_item > i { margin-top: .25em; color: #888; }
.tsc_py_item.tsc_hecha b { text-decoration: line-through; color: #999; }
#py_proximos_titulo { display: flex; justify-content: space-between; align-items: baseline; gap: .5em; margin-top: .8em; }
.tsc_py_persona { display: flex; align-items: center; gap: .6em; padding: 4px 0; border-bottom: solid 1px #F2F2F2; }
.tsc_enlace_titulo { color: inherit; text-decoration: none; }
.tsc_enlace_titulo:hover { color: #C40; text-decoration: underline; }
@media (max-width: 899px) { .tsc_py_rejilla { grid-template-columns: minmax(0, 1fr); } }

/* ---- Aviso breve (T.nota) ---- */
.tsc_aviso_breve { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); max-width: calc(100% - 32px);
            background: #333; color: #FFF; padding: 10px 16px; border-radius: 6px; box-shadow: 0 2px 8px rgba(0,0,0,.3);
            opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 10000; }
.tsc_aviso_breve.tsc_visible { opacity: 1; transform: translate(-50%, 0); }
.tsc_repite { color: #888; }

/* ---- Días de la semana de una repetición ---- */
.tsc_dias_semana { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.tsc_dias_semana label { cursor: pointer; }
.tsc_dias_semana input { position: absolute; opacity: 0; width: 0; height: 0; }
.tsc_dias_semana span { display: inline-block; width: 28px; height: 28px; line-height: 28px; text-align: center; border-radius: 50%;
                        border: 1px solid #CCC; background: #FFF; font-weight: bold; user-select: none; }
.tsc_dias_semana input:checked + span { background: #F60; border-color: #F60; color: #FFF; }
.tsc_dias_semana input:focus-visible + span { outline: solid 2px #F60; outline-offset: 1px; }

/* ---- Búsqueda global ---- */
.tsc_bus_cabeza { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
.tsc_bus_cabeza #bus_q { width: calc(100% - 16px); font-size: 16px; }
#bus_resultados { max-height: 60vh; overflow-y: auto; }
.tsc_bus_grupo h4 { margin: 10px 0 4px; font-size: 85%; text-transform: uppercase; letter-spacing: .04em; color: #888; }
.tsc_bus_item { display: flex; flex-direction: column; gap: 1px; padding: 6px 8px; border-radius: 4px; cursor: pointer; color: inherit; text-decoration: none; }
.tsc_bus_item.tsc_bus_activo { background: #FFF1E6; outline: 1px solid #FFD2AD; }
.tsc_bus_titulo { font-weight: bold; }
.tsc_bus_trozo { font-size: 90%; color: #555; }
.tsc_bus_apagado .tsc_bus_titulo { color: #888; font-weight: normal; }
.tsc_bus_item mark { background: #FFE08A; color: inherit; padding: 0 1px; border-radius: 2px; }
.tsc_bus_mas { display: inline-block; margin: 2px 8px 4px; font-size: 90%; }
.tsc_bus_vacio { padding: 12px 4px; }
.tsc_bus_teclas { margin: 10px 0 0; }
.tsc_bus_teclas kbd { border: 1px solid #CCC; border-bottom-width: 2px; border-radius: 3px; padding: 0 4px; font-size: 85%; background: #FFF; }

/* ---- Aviso de filtros activos en una vista ---- */
.tsc_filtros_activos { margin: 0 0 10px; padding: 6px 10px; background: #FFF7E6; border: 1px solid #FFE0A8; border-radius: 4px; }

/* ---- Revisión semanal ---- */
.tsc_rv_estado { margin: 0 0 12px; }
.tsc_rv_rejilla { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 12px; align-items: start; }
.tsc_rv_apartado h3 { margin: 0 0 4px; font-size: 110%; display: flex; align-items: center; gap: .4em; }
.tsc_rv_apartado h3 .tsc_contador { margin-left: auto; }
.tsc_rv_apartado.tsc_rv_vacio { opacity: .75; }
.tsc_rv_fila { display: flex; align-items: flex-start; gap: .6em; padding: 6px 0; border-top: solid 1px #F0F0F0; }
.tsc_rv_cuerpo { flex: 1; min-width: 0; }
.tsc_rv_titulo { font-weight: bold; }
.tsc_rv_acciones { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; max-width: 55%; }
.tsc_rv_acciones select.bca_in { width: 9em; }
.tsc_rv_hecha { color: #4A4; width: 16px; text-align: center; margin-top: 2px; }
.tsc_lat_revision { margin-top: 6px; }
@media (max-width: 599px) {
  .tsc_rv_rejilla { grid-template-columns: 1fr; }
  .tsc_rv_fila { flex-wrap: wrap; }
  .tsc_rv_acciones { max-width: none; width: 100%; justify-content: flex-start; padding-left: 22px; }
}

/* ---- Sin conexión ---- */
.tsc_sin_conexion { position: sticky; top: 0; z-index: 900; margin: 0 0 10px; padding: 8px 12px; background: #37474F; color: #FFF;
                    border-radius: 0 0 4px 4px; font-size: 95%; }
