/*
 * Fénix — estilos propios sobre la plantilla Droplet.
 * Paleta: negro, blanco, gris suave y naranja del logo. Títulos y números en Barlow Condensed.
 * Clases propias con prefijo fx-.
 */

:root {
	--fx-negro: #0E0E0E;
	--fx-negro-2: #1A1A1A;
	--fx-tinta: #111111;
	--fx-gris-fondo: #F2F2F0;
	--fx-gris-linea: #E4E4E1;
	--fx-gris-texto: #5F5F5F;
	--fx-naranja: #F04E0F;
	--fx-naranja-osc: #B13A0B;
	--fx-naranja-suave: #FFF1EA;
	--fx-sobre-naranja: #111111;   /* letra sobre el color de acento (el tema la calcula) */
	--fx-cond: "Barlow Condensed", "Inter", sans-serif;

	--bs-theme: #F04E0F;
	--bs-theme-rgb: 240, 78, 15;
	--bs-theme-color: #111111;
	--bs-body-bg: #F2F2F0;
	--bs-link-color: #111111;
	--bs-link-hover-color: #B13A0B;
	--bs-body-font-size: .8125rem;   /* 13 px: letra base compacta */
}

body { background: var(--fx-gris-fondo); color: var(--fx-tinta); font-size: var(--bs-body-font-size); }

/* ---------- Tipografía (compacta) ---------- */
.fx-titulo { font-family: "Inter", sans-serif; font-weight: 700; letter-spacing: -.01em; line-height: 1.2; font-size: 1.35rem; margin: 0; }
.fx-subtitulo { font-family: "Inter", sans-serif; font-weight: 600; font-size: .95rem; margin: 0; }
.fx-kicker { font-size: .68rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--fx-naranja-osc); margin-bottom: .15rem; }
.fx-kicker a { color: inherit; text-decoration: none; }
.fx-num { font-family: var(--fx-cond); font-weight: 800; line-height: 1; }

/* ---------- Encabezado ---------- */
.fx-header { background: #fff; border-bottom: 1px solid var(--fx-gris-linea); }
.fx-brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--fx-tinta); }
.fx-brand-tile { width: 36px; height: 36px; border-radius: 10px; background: #fff; display: inline-flex; align-items: center; justify-content: center; overflow: hidden; box-shadow: 0 0 0 1px var(--fx-gris-linea); }
.fx-brand-tile img { height: 28px; width: auto; }
.fx-brand-tile.lg { width: 56px; height: 56px; border-radius: 14px; box-shadow: none; }
.fx-brand-tile.lg img { height: 44px; }
.fx-brand-txt { font-family: var(--fx-cond); font-weight: 700; font-size: 1.15rem; letter-spacing: .05em; text-transform: uppercase; }
.fx-avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--fx-naranja); color: var(--fx-sobre-naranja); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .7rem; }
.fx-avatar.lg { width: 38px; height: 38px; font-size: .8rem; }
.fx-user-link { display: flex; align-items: center; gap: .6rem; }
.fx-user-txt span { display: block; font-weight: 600; font-size: .8rem; line-height: 1.1; color: var(--fx-tinta); }
.fx-user-txt small { color: var(--fx-gris-texto); font-size: .68rem; }
.fx-drop { min-width: 260px; border: 0; border-radius: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.fx-user-head { display: flex; gap: .75rem; align-items: center; padding: .75rem 1rem; }

/* ---------- Menú lateral negro ---------- */
.fx-sidebar { background: var(--fx-negro) !important; }
.fx-sidebar .menu-header { color: #8A8A8A; font-size: .7rem; letter-spacing: .12em; }
.fx-sidebar .menu .menu-item .menu-link { color: #C4C4C4; border-radius: 8px; font-size: .8rem; }
.fx-sidebar .menu .menu-item .menu-link:hover { color: #fff; background: rgba(255,255,255,.06); }
.fx-sidebar .menu .menu-item .menu-icon { color: inherit; }
.fx-sidebar .menu .menu-item.has-sub.active > .menu-link { color: #fff; }
.fx-sidebar .menu .menu-submenu .menu-item .menu-link { color: #A8A8A8; }
.fx-sidebar .menu .menu-submenu .menu-item.active > .menu-link { background: var(--fx-naranja); color: var(--fx-tinta); font-weight: 700; }
.fx-club { display: flex; align-items: center; gap: .6rem; padding: .9rem .75rem; margin: 0 .5rem .75rem; border-bottom: 1px solid #262626; }
.fx-club-escudo { width: 36px; height: 36px; object-fit: contain; background: #fff; border-radius: 10px; padding: 3px; flex-shrink: 0; }
.fx-club-ini { width: 36px; height: 36px; border-radius: 10px; background: var(--fx-negro-2); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .8rem; flex-shrink: 0; }
.fx-club-nom { color: #fff; font-weight: 600; font-size: .8rem; line-height: 1.2; }

/* ---------- Contenido ---------- */
.fx-content { padding: 1.25rem 1.5rem 2.5rem; }
@media (max-width: 767.98px){ .fx-content { padding: 1rem .75rem 2rem; } }
.fx-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: .75rem; margin-bottom: 1rem; }
.fx-card { background: #fff; border: 0; border-radius: 12px; }
.fx-card-pad { padding: 1rem 1.15rem; }
.fx-kpi { border-radius: 12px; padding: .8rem 1rem; background: #fff; display: flex; flex-direction: column; gap: .2rem; border: 0; text-align: left; color: var(--fx-tinta); width: 100%; }
.fx-kpi .fx-num { font-size: 1.75rem; }
.fx-kpi .lbl { font-size: .68rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.fx-kpi small { font-size: .72rem; }
.fx-kpi.hot { background: var(--fx-naranja); color: var(--fx-sobre-naranja); }
.fx-kpi.sel { background: var(--fx-negro); color: #fff; box-shadow: inset 0 -4px 0 var(--fx-naranja); }
button.fx-kpi { cursor: pointer; }

/* ---------- Botones ---------- */
.btn { --bs-btn-font-size: .8125rem; --bs-btn-padding-y: .35rem; --bs-btn-padding-x: .8rem; --bs-btn-border-radius: 8px; }
.btn-sm { --bs-btn-font-size: .75rem; --bs-btn-padding-y: .2rem; --bs-btn-padding-x: .55rem; --bs-btn-border-radius: 6px; }
.form-control, .form-select { font-size: .8125rem; padding: .35rem .65rem; border-radius: 8px; }
.form-select { padding-right: 2rem; }
.form-label { font-size: .75rem; font-weight: 500; margin-bottom: .25rem; color: #3F3F3F; }
.input-group-text { font-size: .8125rem; padding: .35rem .65rem; }
.btn-dark { --bs-btn-bg: var(--fx-tinta); --bs-btn-border-color: var(--fx-tinta); }
.btn-fx { background: var(--fx-naranja); color: var(--fx-sobre-naranja); font-weight: 700; border: 0; }
.btn-fx:hover { background: var(--fx-naranja); filter: brightness(.92); color: var(--fx-sobre-naranja); }
.btn .fa-plus { color: var(--fx-naranja); }
.btn-fx .fa-plus { color: var(--fx-sobre-naranja); }
.fx-cargando { opacity: .6; pointer-events: none; }
/* Regla de formularios: mientras la página no ha cargado, los botones de enviar no responden */
.fx-pagina-cargando [type=submit] { opacity: .55; pointer-events: none; cursor: progress; }
.fx-recargando { opacity: .5; transition: opacity .15s; }

/* ---------- Tablas ---------- */
.fx-tabla { margin: 0; }
.fx-tabla thead th { background: var(--fx-tinta); color: #fff; font-size: .66rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; border: 0; padding: .55rem .75rem; white-space: nowrap; }
.fx-tabla tbody td { padding: .45rem .75rem; vertical-align: middle; border-color: #EFEFED; font-size: .8rem; }
.fx-tabla tbody tr:hover { background: #FAFAF9; }
.fx-chip { display: inline-block; font-size: .66rem; font-weight: 600; padding: .15rem .5rem; border-radius: 999px; background: var(--fx-gris-fondo); color: #3F3F3F; white-space: nowrap; }
.fx-chip.on { background: var(--fx-tinta); color: #fff; }
.fx-chip.alerta { background: var(--fx-naranja); color: var(--fx-sobre-naranja); }
.fx-foto { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; background: var(--fx-tinta); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: .68rem; flex-shrink: 0; }
.fx-foto.xl { width: 72px; height: 72px; font-size: 1.4rem; border-radius: 16px; }
/* ---------- Imágenes con loader (img_fx en class/subidas.php) ---------- */
.fx-imgbox { position: relative; display: inline-flex; align-items: center; justify-content: center; overflow: hidden; flex-shrink: 0; vertical-align: middle; }
.fx-imgbox:not(.ok):not(.err) { background: #E6E6E3 !important; }
.fx-imgbox:not(.ok):not(.err)::before { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 20%, rgba(255,255,255,.65) 50%, transparent 80%); animation: fx-brillo 1.1s ease-in-out infinite; }
@keyframes fx-brillo { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce){ .fx-imgbox::before { animation: none !important; } }
.fx-imgbox .fx-img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s ease; }
.fx-imgbox.ok .fx-img { opacity: 1; }
.fx-imgbox .fx-img-ini { display: none; }
.fx-imgbox.err .fx-img { display: none; }
.fx-imgbox.err .fx-img-ini { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.fx-escudo .fx-img, .fx-org-logo .fx-img, .fx-club-escudo .fx-img { object-fit: contain; }

.fx-escudo { width: 48px; height: 48px; object-fit: contain; background: #fff; border-radius: 12px; padding: 4px; box-shadow: 0 0 0 1px var(--fx-gris-linea); flex-shrink: 0; }
.fx-escudo.err { background: var(--fx-tinta); color: #fff; font-weight: 700; font-size: .75rem; box-shadow: none; padding: 0; }
.fx-escudo.sm.err { font-size: .62rem; }
.fx-escudo-52 { width: 52px; height: 52px; }
.fx-club-escudo.err { background: var(--fx-negro-2); color: #fff; font-weight: 700; font-size: .8rem; padding: 0; }
.fx-foto.err { background: var(--fx-tinta); color: #fff; }
.fx-escudo.sm { width: 30px; height: 30px; border-radius: 8px; padding: 2px; }
.fx-escudo-ini { display: inline-flex; align-items: center; justify-content: center; background: var(--fx-tinta); color: #fff; font-weight: 700; font-size: .75rem; box-shadow: none; }
.fx-escudo.sm.fx-escudo-ini { font-size: .62rem; }
.min-w-0 { min-width: 0; }

/* ---------- Segmentos (pestañas tipo píldora) ---------- */
.fx-seg { display: inline-flex; gap: 3px; padding: 3px; background: var(--fx-gris-fondo); border-radius: 9px; flex-wrap: wrap; }
.fx-seg .btn { border: 0; border-radius: 7px; font-weight: 500; color: #3F3F3F; --bs-btn-padding-y: .25rem; --bs-btn-padding-x: .65rem; }
.fx-seg .btn.active { background: var(--fx-tinta); color: #fff; font-weight: 600; }

/* ---------- Ficha ---------- */
.fx-ficha-top { background: var(--fx-negro); color: #fff; border-radius: 12px; padding: 1rem 1.15rem; position: relative; overflow: hidden; display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }
.fx-ficha-top::before, .fx-ficha-top::after { content: ""; position: absolute; top: -40px; height: 260px; background: var(--fx-naranja); transform: skewX(-24deg); }
.fx-ficha-top::before { right: 70px; width: 36px; }
.fx-ficha-top::after { right: 20px; width: 16px; opacity: .5; }
.fx-ficha-top > * { position: relative; }
.fx-ficha-top .fx-titulo { font-size: 1.25rem; }
.fx-ficha-dato small { display: block; color: #A8A8A8; font-size: .64rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.fx-ficha-dato span { font-weight: 500; font-size: .8rem; }
.fx-tabs .nav-link { color: var(--fx-gris-texto); font-weight: 500; font-size: .8rem; border: 0; border-bottom: 2px solid transparent; border-radius: 0; padding: .6rem .8rem; }
.fx-tabs .nav-link.active { color: var(--fx-tinta); font-weight: 600; border-bottom-color: var(--fx-naranja); background: transparent; }
.fx-dl { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .6rem 1.25rem; margin: 0; }
.fx-dl dt { font-size: .66rem; text-transform: uppercase; letter-spacing: .05em; color: var(--fx-gris-texto); font-weight: 600; }
.fx-dl dd { margin: 0; font-size: .8rem; }

/* ---------- Formularios ---------- */
.fx-form-sec { font-family: "Inter", sans-serif; font-weight: 600; font-size: .85rem; margin: 0 0 .75rem; display: flex; align-items: center; gap: .45rem; }
.fx-form-sec::before { content: ""; width: 12px; height: 3px; background: var(--fx-naranja); border-radius: 2px; }
.form-control:focus, .form-select:focus { border-color: var(--fx-tinta); box-shadow: 0 0 0 .2rem rgba(240,78,15,.25); }

/* ---------- Vacío ---------- */
.fx-vacio { text-align: center; max-width: 520px; margin: 0 auto; }
.fx-vacio-ico { width: 72px; height: 72px; border-radius: 20px; background: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 1.8rem; color: var(--fx-naranja); margin-bottom: 1rem; }

/* ---------- Login ---------- */
.fx-login { position: relative; overflow: hidden; min-height: 100vh; background: var(--fx-negro); color: #fff; display: flex; flex-wrap: wrap; align-items: center; gap: 2.5rem; padding: 2.5rem 4rem; }
.fx-login-franja { position: absolute; top: -120px; height: 1400px; background: var(--fx-naranja); transform: skewX(-22deg); }
.fx-login-franja.f1 { left: 52%; width: 150px; }
.fx-login-franja.f2 { left: calc(52% + 190px); width: 70px; opacity: .55; }
.fx-login-franja.f3 { left: calc(52% + 300px); width: 30px; opacity: .3; }
.fx-login-intro { position: relative; flex: 1 1 480px; display: flex; flex-direction: column; gap: 2rem; }
.fx-login-marca { display: flex; align-items: center; gap: .7rem; font-family: var(--fx-cond); font-weight: 700; font-size: 1.25rem; letter-spacing: .06em; text-transform: uppercase; }
.fx-login-intro h1 { font-family: var(--fx-cond); font-weight: 800; font-size: clamp(2.2rem, 5vw, 4.2rem); line-height: .95; text-transform: uppercase; margin: 0; color: #fff; }
.fx-login-intro h1 em { font-style: normal; color: var(--fx-naranja); }
.fx-login-intro p { max-width: 400px; font-size: .9rem; color: #BDBDBD; margin: 0; }
.fx-login-panel { position: relative; flex: 0 1 360px; margin-left: auto; }
.fx-login-form { background: #fff; color: var(--fx-tinta); border-radius: 14px; padding: 1.75rem; }
.fx-login-form h2 { font-family: "Inter", sans-serif; font-weight: 700; font-size: 1.25rem; margin: 0 0 .25rem; }
.fx-login-form .form-control { background: #F7F7F6; padding: .5rem .75rem; }
.fx-btn-entrar { height: 40px; border-radius: 8px; background: var(--fx-tinta); color: #fff; font-size: .85rem; font-weight: 600; }
.fx-btn-entrar:hover { background: #000; color: #fff; }
.fx-btn-entrar i { color: var(--fx-naranja); }
@media (max-width: 767.98px){
	.fx-login { padding: 2rem 1rem; gap: 2rem; }
	.fx-login-panel { margin-left: 0; flex-basis: 100%; }
	.fx-login-form { padding: 1.75rem; }
	.fx-login-franja.f1 { left: 70%; }
}

/* Modales con <form> envolviendo header/body/footer: el form debe dejar que el cuerpo haga scroll (modal-dialog-scrollable) */
.modal-dialog-scrollable .modal-content > form { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; max-height: 100%; overflow: hidden; }
.modal-dialog-scrollable .modal-content > form > .modal-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }

/* Recuperar clave (login.php) */
.fx-login-form[hidden] { display: none !important; }
.fx-login-olvido, .fx-login-volver { background: none; border: 0; padding: 0; font-size: .8rem; font-weight: 600; color: var(--fx-naranja); cursor: pointer; }
.fx-login-olvido:hover, .fx-login-volver:hover { text-decoration: underline; }
.fx-login-volver { color: var(--fx-gris-texto); margin-bottom: .9rem; display: inline-flex; align-items: center; }
.fx-login-ojo { position: relative; }
.fx-login-ojo .form-control { padding-right: 2.6rem; }
.fx-login-ojo button { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 34px; height: 30px; border: 0; background: none; color: var(--fx-gris-texto); }
.fx-login-fuerza { height: 4px; border-radius: 9px; background: #EDEDEA; margin-top: .45rem; overflow: hidden; }
.fx-login-fuerza i { display: block; height: 100%; width: 0; transition: width .2s, background .2s; background: #D93025; }
.fx-login-fuerza i.media { background: #F2B705; } .fx-login-fuerza i.alta { background: #14A44D; }
