/*
 * Fénix — diseño portal (sin menú lateral): organizaciones, clubes y torneos.
 * Usa las variables de fenix.css.
 */

.fx-portal { min-height: 100vh; background: var(--fx-gris-fondo); }
.fx-top { position: sticky; top: 0; z-index: 1020; height: 56px; background: var(--fx-negro); color: #fff; display: flex; align-items: center; gap: 1.25rem; padding: 0 1.5rem; }
.fx-top-marca { display: flex; align-items: center; gap: .6rem; color: #fff; text-decoration: none; }
.fx-top-marca:hover { color: #fff; }
.fx-brand-tile.sm { width: 30px; height: 30px; border-radius: 8px; box-shadow: none; }
.fx-brand-tile.sm img { height: 24px; }
.fx-top .fx-brand-txt { font-size: 1.05rem; color: #fff; }
.fx-migas { display: flex; align-items: center; gap: .35rem; min-width: 0; overflow: hidden; }
.fx-miga { padding: .3rem .75rem; border-radius: 999px; color: #C4C4C4; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fx-miga:hover { color: #fff; background: rgba(255,255,255,.08); }
.fx-miga.actual { background: var(--fx-naranja); color: var(--fx-tinta); font-weight: 600; }
.fx-migas-sep { color: #5F5F5F; }
.fx-top-der { margin-left: auto; display: flex; align-items: center; gap: .75rem; }
.fx-top-btn { width: 32px; height: 32px; border-radius: 8px; border: 1px solid #2E2E2E; background: transparent; color: #C4C4C4; display: inline-flex; align-items: center; justify-content: center; }
.fx-top-btn:hover { color: #fff; border-color: #5F5F5F; }
.fx-top-user { display: flex; align-items: center; gap: .5rem; background: transparent; border: 0; color: #fff; padding: 0; font-size: .8rem; }
.fx-top-user small { color: #A8A8A8; font-size: .68rem; }
.fx-apps { min-width: 240px; max-height: 70vh; overflow-y: auto; }
.fx-apps .dropdown-header { font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; color: var(--fx-naranja-osc); font-weight: 700; }
.fx-apps .dropdown-item { font-size: .8rem; padding-left: 2rem; }
@media (max-width: 767.98px){ .fx-top { padding: 0 .75rem; gap: .6rem; } .fx-top .fx-brand-txt { display: none; } }

/* Inicio del club: módulos en tarjetas */
.fx-modulos { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: .75rem; }
.fx-modulo { background: #fff; border-radius: 12px; padding: .9rem 1rem; display: flex; flex-direction: column; gap: .6rem; }
.fx-modulo-cab { display: flex; align-items: center; gap: .7rem; }
.fx-modulo-ico { width: 36px; height: 36px; border-radius: 10px; background: var(--fx-tinta); color: #fff; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.fx-modulo-nombre { font-size: .9rem; font-weight: 600; margin: 0; }
.fx-modulo-ops { list-style: none; margin: 0; padding: 0; border-top: 1px solid #EFEFED; }
.fx-modulo-ops a { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .45rem .1rem; border-bottom: 1px solid #F5F5F3; color: var(--fx-tinta); text-decoration: none; font-size: .8rem; }
.fx-modulo-ops li:last-child a { border-bottom: 0; }
.fx-modulo-ops a:hover { color: var(--fx-naranja-osc); }
.fx-modulo-ops a .fa { font-size: .7rem; color: var(--fx-naranja); }
.fx-modulo-ops a.pronto { color: var(--fx-gris-texto); }
.fx-aviso { background: #fff; border-radius: 10px; padding: .65rem .9rem; display: flex; align-items: center; gap: .6rem; font-size: .8rem; }
.fx-aviso > .fa { color: var(--fx-naranja); }

/* Franja y menú del club */
.fx-club-band .fx-wrap { padding-top: .8rem; padding-bottom: .6rem; }
.fx-escudo-44 { width: 44px; height: 44px; border-radius: 11px; }
.fx-club-titulo { font-weight: 700; font-size: 1.05rem; line-height: 1.2; }
.fx-club-menu.fx-wrap { display: flex; flex-wrap: wrap; gap: .25rem; padding-top: 0; padding-bottom: 0; }
.fx-club-menu-item { display: inline-flex; align-items: center; gap: .45rem; height: 40px; padding: 0 .8rem; border: 0; border-bottom: 2px solid transparent; background: transparent; color: #3F3F3F; font-size: .8rem; font-weight: 500; text-decoration: none; }
.fx-club-menu-item:hover { color: var(--fx-tinta); background: var(--fx-gris-fondo); }
.fx-club-menu-item.activo { color: var(--fx-tinta); font-weight: 600; border-bottom-color: var(--fx-naranja); }
.fx-club-menu-item .fa:first-child { color: var(--fx-gris-texto); font-size: .8rem; }
.fx-club-menu-item.activo .fa:first-child { color: var(--fx-naranja-osc); }
.fx-caret { font-size: .55rem; opacity: .6; }
.fx-club-menu .dropdown-item.active { background: var(--fx-naranja-suave); color: var(--fx-tinta); font-weight: 600; }

.fx-wrap { max-width: 1180px; margin: 0 auto; padding: 1.5rem 1.5rem 2.5rem; }
@media (max-width: 767.98px){ .fx-wrap { padding: 1rem .75rem 2rem; } }
.fx-band { background: #fff; border-bottom: 1px solid var(--fx-gris-linea); }
.fx-band .fx-wrap { padding-top: 1.1rem; padding-bottom: 1.1rem; display: flex; flex-wrap: wrap; align-items: center; gap: 1.1rem; }
.fx-stats { display: flex; flex-wrap: wrap; gap: 1.6rem; }
.fx-stat .fx-num { display: block; font-size: 1.4rem; }
.fx-stat small { font-size: .7rem; color: var(--fx-gris-texto); }

/* Franja de totales */
.fx-totales { background: #fff; border-radius: 12px; display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.fx-totales > div { padding: .85rem 1.1rem; border-right: 1px solid #EFEFED; }
.fx-totales > div:last-child { border-right: 0; }
.fx-totales small { display: block; font-size: .7rem; color: var(--fx-gris-texto); font-weight: 500; }
.fx-totales .fx-num { font-size: 1.6rem; }

/* Tarjetas de organización */
.fx-org { position: relative; overflow: hidden; border-radius: 16px; padding: 1.35rem 1.5rem; display: flex; flex-direction: column; gap: 1rem; min-height: 250px; background: #fff; color: var(--fx-tinta); }
.fx-org.oscura { background: var(--fx-negro); color: #fff; }
.fx-org.oscura::before, .fx-org.oscura::after { content: ""; position: absolute; top: -40px; height: 380px; background: var(--fx-naranja); transform: skewX(-22deg); }
.fx-org.oscura::before { right: 80px; width: 46px; }
.fx-org.oscura::after { right: 26px; width: 20px; opacity: .5; }
.fx-org > * { position: relative; }
.fx-org-nombre { font-family: var(--fx-cond); font-weight: 800; font-size: 2rem; line-height: 1; margin: .25rem 0 0; text-transform: uppercase; color: var(--fx-tinta); overflow-wrap: anywhere; }
.fx-org.oscura .fx-org-nombre { color: #fff; }

/* Escudo grande de la organización (columna col-md-5) */
.fx-org-logo { aspect-ratio: 1 / 1; width: 100%; max-width: 220px; margin: 0 auto; border-radius: 20px; background: var(--fx-gris-fondo); display: flex; align-items: center; justify-content: center; padding: 14%; }
.fx-org.oscura .fx-org-logo { background: #fff; }
.fx-org-logo.fx-imgbox { display: flex; }
.fx-org-logo .fx-img-ini { font-family: var(--fx-cond); font-weight: 800; font-size: 3.5rem; color: var(--fx-tinta); }
.fx-org-logo .fx-img-ini i { font-size: 3.2rem; color: var(--fx-naranja-osc); }
/* Logo grande: además del brillo, un círculo girando */
.fx-org-logo:not(.ok):not(.err)::after { content: ""; position: absolute; width: 28px; height: 28px; border: 3px solid rgba(0,0,0,.12); border-top-color: var(--fx-naranja); border-radius: 50%; animation: fx-gira .8s linear infinite; }
@keyframes fx-gira { to { transform: rotate(360deg); } }
@media (max-width: 767.98px){ .fx-org-logo { max-width: 140px; } }
.fx-org .fx-escudo { width: 56px; height: 56px; border-radius: 14px; box-shadow: none; }
.fx-org-ico { width: 56px; height: 56px; border-radius: 14px; background: var(--fx-naranja-suave); color: var(--fx-naranja-osc); display: inline-flex; align-items: center; justify-content: center; font-size: 1.4rem; flex-shrink: 0; }
.fx-etiqueta { display: inline-block; font-size: .62rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: .1rem .5rem; border-radius: 999px; background: var(--fx-naranja-suave); color: var(--fx-naranja-osc); }
.fx-org.oscura .fx-etiqueta { background: #262626; color: #C4C4C4; }
.fx-org.oscura .fx-stat small, .fx-org.oscura .fx-desc { color: #A8A8A8; }
.fx-org .fx-stat .fx-num { font-size: 1.5rem; }
.fx-org-curso { border: 1px solid #EFEFED; border-radius: 12px; padding: .75rem .9rem; display: flex; flex-direction: column; gap: .45rem; text-decoration: none; color: inherit; }
.fx-org-curso:hover { border-color: var(--fx-naranja); color: inherit; }
.fx-barra { height: 6px; border-radius: 3px; background: #EFEFED; overflow: hidden; }
.fx-barra > span { display: block; height: 100%; background: var(--fx-naranja); }
.fx-org.oscura .fx-barra, .fx-destacado .fx-barra { background: #262626; }

/* Accesos rápidos */
.fx-rapido { background: #fff; border-radius: 10px; padding: .75rem .9rem; display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--fx-tinta); }
.fx-rapido:hover { color: var(--fx-tinta); box-shadow: 0 0 0 1px var(--fx-naranja); }
.fx-rapido i { width: 30px; height: 30px; border-radius: 8px; background: var(--fx-gris-fondo); display: inline-flex; align-items: center; justify-content: center; }
.fx-rapido small { display: block; font-size: .7rem; color: var(--fx-gris-texto); }

/* Barra de filtros */
.fx-filtros { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-bottom: 1rem; }
.fx-filtros .fx-seg { background: #E8E8E5; }
.fx-filtros .form-select, .fx-filtros .form-control, .fx-filtros .input-group-text { background-color: #fff; }

/* Clubes en tarjetas o en lista */
.fx-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .75rem; }
.fx-tile { background: #fff; border-radius: 12px; padding: 1rem .85rem .85rem; display: flex; flex-direction: column; align-items: center; text-align: center; gap: .45rem; text-decoration: none; color: var(--fx-tinta); border: 1px solid transparent; }
.fx-tile:hover { border-color: var(--fx-naranja); color: var(--fx-tinta); }
.fx-tile.destacado { border-color: var(--fx-naranja); box-shadow: inset 0 -3px 0 var(--fx-naranja); }
.fx-tile .fx-escudo { width: 52px; height: 52px; }
.fx-tile-nombre { font-weight: 600; font-size: .78rem; line-height: 1.3; min-height: 2.1em; display: flex; align-items: center; }
.fx-tile-pie { display: flex; justify-content: center; gap: .9rem; font-size: .7rem; color: var(--fx-gris-texto); border-top: 1px solid #EFEFED; padding-top: .45rem; width: 100%; }
.fx-tile-pie strong { color: var(--fx-tinta); }
.fx-filas { background: #fff; border-radius: 12px; overflow: hidden; }
.fx-fila { display: flex; align-items: center; gap: .75rem; padding: .55rem 1rem; border-top: 1px solid #EFEFED; text-decoration: none; color: var(--fx-tinta); font-size: .8rem; }
.fx-fila:first-child { border-top: 0; }
.fx-fila:hover { background: #FAFAF9; color: var(--fx-tinta); }
.fx-mas { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-top: .9rem; font-size: .75rem; color: var(--fx-gris-texto); }

/* Torneo destacado e historial */
.fx-destacado { position: relative; overflow: hidden; background: var(--fx-negro); color: #fff; border-radius: 16px; padding: 1.35rem 1.5rem; display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: center; margin-bottom: 1.25rem; }
.fx-destacado::before, .fx-destacado::after { content: ""; position: absolute; top: -40px; height: 340px; background: var(--fx-naranja); transform: skewX(-22deg); }
.fx-destacado::before { right: 110px; width: 50px; }
.fx-destacado::after { right: 46px; width: 22px; opacity: .5; }
.fx-destacado > * { position: relative; }
.fx-destacado h2 { font-family: var(--fx-cond); font-weight: 800; font-size: 2.1rem; line-height: 1; margin: 0; text-transform: uppercase; }
/* La plantilla pinta los títulos de negro: en fondos oscuros siempre en blanco */
.fx-destacado :is(h1, h2, h3, h4, h5, h6), .fx-org.oscura :is(h1, h2, h3, h4, h5, h6), .fx-ficha-top :is(h1, h2, h3, h4, h5, h6) { color: #fff; }
.fx-destacado .fx-desc { color: #BDBDBD; }
.fx-cajitas { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; margin-right: 150px; }
.fx-cajitas > div { background: #1C1C1C; border: 1px solid #2E2E2E; border-radius: 12px; padding: .75rem 1rem; min-width: 92px; }
.fx-cajitas .fx-num { display: block; font-size: 1.75rem; }
.fx-cajitas small { font-size: .7rem; color: #A8A8A8; }
.fx-cajitas.cuatro { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 991.98px){ .fx-cajitas { margin-right: 0; } }
@media (max-width: 575.98px){ .fx-cajitas.cuatro { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.fx-org-logo.fx-club-destacado { width: 128px; max-width: 128px; margin: 0; background: #fff; border-radius: 18px; padding: 14px; flex-shrink: 0; }
.fx-chip-destacado { background: var(--fx-naranja); color: var(--fx-tinta); }
.fx-afiches { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: .75rem; }
.fx-afiche { background: #fff; border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; text-decoration: none; color: var(--fx-tinta); border: 1px solid transparent; }
.fx-afiche:hover { border-color: var(--fx-naranja); color: var(--fx-tinta); }
.fx-afiche-banda { height: 66px; padding: 0 .9rem; display: flex; align-items: center; justify-content: space-between; gap: .5rem; background: var(--fx-tinta); color: #fff; }
.fx-afiche-banda.univalle { background: var(--fx-naranja-osc); }
.fx-afiche-banda.otro { background: #3F3F3F; }
.fx-afiche-banda.curso { background: var(--fx-naranja); color: var(--fx-tinta); }
.fx-afiche-banda .fx-num { font-size: 1.8rem; }
.fx-afiche-banda .fx-etiqueta { background: rgba(255,255,255,.16); color: inherit; }
.fx-afiche-banda.curso .fx-etiqueta { background: rgba(0,0,0,.12); }
.fx-afiche-cuerpo { padding: .75rem .9rem; display: flex; flex-direction: column; gap: .35rem; flex: 1; }
.fx-afiche-cuerpo .fx-barra { height: 4px; margin-top: auto; }
.fx-afiche-cuerpo small { font-size: .7rem; color: var(--fx-gris-texto); }
