/**
 * Diseño aprobado del Perfil de Jugador — Espacio Gamer.
 * Paleta: fondo #020e21, acento #ff8c00, tarjetas #0a1830.
 * Se carga DESPUÉS de eg-usuarios.css a propósito, para que estas reglas
 * ganen sobre los estilos genéricos de formulario (edición inline).
 */

@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@600;700&family=Inter:wght@400;500;600&display=swap');

.eg-perfil-wrap {
	max-width: 880px;
	margin: 0 auto;
	font-family: 'Inter', sans-serif;
	color: #d0d0d0;
}

.eg-hero-perfil {
	background: linear-gradient(135deg, #0a1830 0%, #050d1c 100%);
	border: 1px solid rgba(255, 140, 0, 0.25);
	border-radius: 16px;
	padding: 28px;
	display: grid;
	grid-template-columns: 120px 1fr auto;
	gap: 24px;
	align-items: center;
	margin-bottom: 20px;
	position: relative;
	overflow: hidden;
}

.eg-avatar-wrap {
	width: 100px;
}

.eg-avatar-img-wrap {
	position: relative;
	width: 100px;
	height: 100px;
}

.eg-avatar-foto {
	width: 100px;
	height: 100px;
	border-radius: 50%;
	background: linear-gradient(145deg, #1a2c4a, #0d1a30);
	border: 2px solid #ff8c00;
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: 'Rajdhani', sans-serif;
	font-weight: 700;
	font-size: 34px;
	color: #ff8c00;
}

.eg-btn-subir-foto {
	position: absolute;
	bottom: -6px;
	right: -6px;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: #ff8c00;
	border: 3px solid #050d1c;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	font-size: 14px;
}

.eg-nombre-gamertag {
	font-family: 'Rajdhani', sans-serif;
	font-weight: 700;
	font-size: 26px;
	color: #fff;
	margin: 0 0 6px;
}

.eg-badges {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	margin-bottom: 8px;
}

.eg-badge {
	font-size: 11px;
	font-weight: 600;
	padding: 4px 10px;
	border-radius: 20px;
	text-transform: uppercase;
	letter-spacing: 0.4px;
}

.eg-badge-club { background: rgba(255, 140, 0, 0.15); color: #ff8c00; border: 1px solid rgba(255, 140, 0, 0.4); }
.eg-badge-verificado { background: rgba(74, 222, 128, 0.15); color: #4ade80; border: 1px solid rgba(74, 222, 128, 0.4); }
.eg-badge-pendiente { background: rgba(250, 204, 21, 0.15); color: #facc15; border: 1px solid rgba(250, 204, 21, 0.4); }
.eg-badge-ticket-azul { background: rgba(55, 138, 221, 0.15); color: #378add; border: 1px solid rgba(55, 138, 221, 0.4); }

.eg-meta-linea {
	font-size: 13px;
	color: #8a93a6;
	margin: 0;
}

.eg-meta-linea strong { color: #d0d0d0; font-weight: 500; }

.eg-stat-lateral {
	text-align: center;
	border-left: 1px solid rgba(255, 255, 255, 0.08);
	padding-left: 20px;
}

.eg-stat-lateral .eg-num {
	font-family: 'Rajdhani', sans-serif;
	font-weight: 700;
	font-size: 30px;
	color: #ff8c00;
	line-height: 1;
}

.eg-stat-lateral .eg-label {
	font-size: 11px;
	color: #8a93a6;
	text-transform: uppercase;
	margin-top: 4px;
}

.eg-aviso-verificacion {
	grid-column: 1 / -1;
	margin-top: 14px;
	background: rgba(250, 204, 21, 0.08);
	border: 1px solid rgba(250, 204, 21, 0.3);
	border-radius: 10px;
	padding: 10px 14px;
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
	font-size: 13px;
	color: #facc15;
}

.eg-foto-msg {
	display: block;
	font-size: 11px;
	font-weight: 600;
	min-height: 0;
	margin-top: 6px;
	max-width: 100px;
}

.eg-btn-indicaciones-foto {
	background: #1a2c4a;
	color: #8a93a6;
	border: 1px solid rgba(255,255,255,0.1);
	font-size: 10px;
	padding: 4px 8px;
	border-radius: 6px;
	cursor: pointer;
	margin-top: 6px;
	white-space: nowrap;
}

.eg-btn-indicaciones-foto:hover { color: #ff8c00; border-color: rgba(255,140,0,0.4); }

.eg-indicaciones-foto-panel {
	width: 150px;
	background: #1a1a1a;
	color: #d0d0d0;
	font-size: 11px;
	line-height: 1.5;
	padding: 8px 10px;
	border-radius: 6px;
	margin-top: 6px;
}

.eg-icono-verificado {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
	background: #378add;
	color: #fff;
	border-radius: 50%;
	font-size: 12px;
	font-weight: 700;
	vertical-align: middle;
	margin-left: 4px;
}

.eg-icono-warning {
	display: inline-flex;
	align-items: center;
	gap: 2px;
	background: rgba(226, 160, 63, 0.15);
	color: #e2a03f;
	border: 1px solid rgba(226, 160, 63, 0.4);
	border-radius: 20px;
	font-size: 11px;
	font-weight: 700;
	padding: 2px 8px;
	vertical-align: middle;
	margin-left: 6px;
	cursor: help;
}

.eg-avatar-con-imagen {
	background-size: cover;
	background-position: center;
	color: transparent;
}

.eg-badge-foto-pendiente {
	position: absolute;
	bottom: -22px;
	left: 50%;
	transform: translateX(-50%);
	white-space: nowrap;
	font-size: 10px;
	font-weight: 600;
	color: #facc15;
	background: rgba(250, 204, 21, 0.12);
	border: 1px solid rgba(250, 204, 21, 0.35);
	padding: 2px 8px;
	border-radius: 10px;
}

.eg-aviso-verificacion button {
	background: transparent;
	border: 1px solid #facc15;
	color: #facc15;
	padding: 5px 12px;
	border-radius: 6px;
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
}

.eg-grid-secciones {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
	margin-bottom: 20px;
}

.eg-tarjeta {
	background: #0a1830;
	border: 1px solid rgba(255, 255, 255, 0.06);
	border-radius: 14px;
	padding: 20px;
}

.eg-tarjeta h3 {
	font-family: 'Rajdhani', sans-serif;
	font-size: 14px;
	font-weight: 700;
	color: #fff;
	text-transform: uppercase;
	letter-spacing: 0.6px;
	margin: 0 0 14px;
	display: flex;
	align-items: center;
	gap: 8px;
}

.eg-tarjeta h3::before {
	content: "";
	width: 4px;
	height: 14px;
	background: #ff8c00;
	border-radius: 2px;
	display: inline-block;
}

.eg-fila-dato {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	padding: 9px 0;
	border-bottom: 1px solid rgba(255, 255, 255, 0.05);
	font-size: 13px;
}

.eg-fila-dato:last-child { border-bottom: none; }
.eg-fila-dato .eg-k { color: #8a93a6; }
.eg-fila-dato .eg-v { color: #e8e8e8; font-weight: 500; }
.eg-fila-dato .eg-v-editable { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.eg-lapiz {
	font-size: 12px;
	color: #ff8c00;
	cursor: pointer;
	opacity: 0.85;
}

.eg-dias-restantes {
	font-size: 11px;
	color: #6b7280;
}

.eg-form-edicion-campo {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	flex-wrap: wrap;
}

.eg-form-edicion-campo .eg-input-nuevo-valor {
	padding: 5px 8px;
	border-radius: 6px;
	border: 1px solid rgba(255, 140, 0, 0.4);
	background: #050d1c;
	color: #fff;
	font-size: 12px;
}

.eg-btn-guardar-campo,
.eg-btn-cancelar-campo {
	font-size: 11px;
	padding: 5px 10px;
	border-radius: 6px;
	cursor: pointer;
	border: 1px solid transparent;
}

.eg-btn-guardar-campo {
	background: #ff8c00;
	color: #000;
	font-weight: 600;
}

.eg-btn-cancelar-campo {
	background: transparent;
	color: #8a93a6;
	border-color: rgba(255, 255, 255, 0.15);
}

.eg-campo-perfil-msg {
	font-size: 11px;
	font-weight: 600;
}

.eg-tabs-nav {
	display: flex;
	gap: 8px;
	margin: 20px 0 16px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.eg-tab-btn {
	background: transparent !important;
	border: none !important;
	border-bottom: 2px solid transparent !important;
	color: #8a93a6 !important;
	font-family: 'Rajdhani', sans-serif;
	font-weight: 700;
	font-size: 14px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	padding: 10px 4px !important;
	cursor: pointer;
	box-shadow: none !important;
}

.eg-tab-btn:hover { color: #d0d0d0 !important; }

.eg-tab-btn.eg-tab-activo {
	color: #ff8c00 !important;
	border-bottom-color: #ff8c00 !important;
}

.eg-tab-panel .eg-tarjeta {
	margin-bottom: 16px;
}

.eg-config-foto-fila {
	display: flex;
	align-items: flex-start;
	gap: 20px;
	flex-wrap: wrap;
}

.eg-avatar-wrap-config {
	width: 100px;
}

.eg-banner-fichado {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	background: rgba(255, 140, 0, 0.1);
	border: 1px solid rgba(255, 140, 0, 0.35);
	border-radius: 10px;
	padding: 8px 14px;
	margin: 8px 0;
	color: #d0d0d0 !important;
	font-size: 13px;
}

.eg-banner-fichado strong {
	color: #ff8c00;
}

.eg-banner-fichado:hover {
	background: rgba(255, 140, 0, 0.16);
}

.eg-tarjeta-stats-full {
	grid-column: 1 / -1;
}

/* Directorio (jugadores) — mismo lenguaje visual que el de clubes */
.eg-directorio-clubes-wrap {
	max-width: 900px;
	margin: 0 auto;
}

.eg-directorio-clubes-wrap input {
	width: 100%;
	padding: 10px;
	border-radius: 6px;
	border: 1px solid rgba(255, 140, 0, 0.4);
	background: #050d1c;
	color: #fff;
	margin-bottom: 16px;
}

.eg-grilla-directorio {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 14px;
}

@media (max-width: 700px) {
	.eg-grilla-directorio { grid-template-columns: repeat(2, 1fr); }
}

.eg-tarjeta-club {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	background: #0a1830;
	border: 1px solid rgba(255, 255, 255, 0.06);
	border-radius: 12px;
	padding: 18px 12px;
	text-decoration: none !important;
	color: #d0d0d0;
}

.eg-tarjeta-club:hover,
.eg-tarjeta-club:visited,
.eg-tarjeta-club * {
	text-decoration: none !important;
}

.eg-tarjeta-club:hover {
	border-color: rgba(255, 140, 0, 0.4);
	background: rgba(255, 140, 0, 0.05);
}

.eg-tarjeta-club .eg-club-escudo {
	width: 56px;
	height: 56px;
	font-size: 20px;
	margin-bottom: 10px;
}

.eg-jugador-avatar-directorio {
	width: 56px;
	height: 56px;
	border-radius: 50%;
	object-fit: cover;
	margin-bottom: 10px;
}

.eg-jugador-avatar-directorio-inicial {
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(145deg, #1a2c4a, #0d1a30);
	border: 1px solid rgba(255, 140, 0, 0.3);
	color: #ff8c00;
	font-family: 'Rajdhani', sans-serif;
	font-weight: 700;
	font-size: 20px;
}

.eg-tarjeta-club-nombre {
	color: #fff;
	font-weight: 600;
	font-size: 13px;
}

.eg-tarjeta-club-division {
	color: #8a93a6;
	font-size: 11px;
	margin-top: 2px;
}

.eg-btn-ver-mas {
	display: block;
	margin: 20px auto 0;
	background: transparent;
	border: 1px solid rgba(255, 140, 0, 0.4);
	color: #ff8c00;
	padding: 10px 24px;
	border-radius: 6px;
	cursor: pointer;
	font-family: 'Rajdhani', sans-serif;
	font-weight: 700;
	text-transform: uppercase;
}

.eg-btn-ver-mas:hover { background: rgba(255, 140, 0, 0.1); }

.eg-club-escudo-img {
	object-fit: contain;
	background: none;
	border: none;
	border-radius: 0;
}

.eg-substats-titulo {
	font-size: 11px;
	color: #8a93a6;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	margin: 16px 0 8px;
}

.eg-titulo-equipo-reporte {
	font-size: 16px;
	font-weight: 700;
	font-family: 'Rajdhani', sans-serif;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: #ff8c00;
	margin: 18px 0 8px;
	padding-bottom: 4px;
	border-bottom: 1px solid rgba(255, 140, 0, 0.25);
}

.eg-tabla-stats-division {
	width: 100%;
	border-collapse: collapse;
	font-size: 12px;
}

/* El "la tabla es su propio contenedor de scroll" solo hace falta en
   celular — en PC estaba rompiendo el ancho normal de la tabla
   (display:block hace que las columnas se compriman a su contenido
   mínimo en vez de repartirse en todo el ancho disponible). */
@media (max-width: 768px) {
	.eg-tabla-stats-division {
		display: block;
		overflow-x: auto;
		max-width: 100%;
		scrollbar-width: none;
		-ms-overflow-style: none;
	}

	.eg-tabla-stats-division::-webkit-scrollbar {
		display: none;
	}
}

.eg-tabla-stats-division th {
	text-align: center;
	color: #8a93a6;
	font-weight: 600;
	padding: 6px 8px;
	border-bottom: 1px solid rgba(255,255,255,0.08);
}

.eg-tabla-stats-division th:first-child { text-align: left; }

.eg-tabla-stats-division td {
	text-align: center;
	color: #e8e8e8;
	padding: 6px 8px;
	border-bottom: 1px solid rgba(255,255,255,0.04);
}

.eg-tabla-stats-division td:first-child { text-align: left; color: #fff; font-weight: 500; }

.eg-club-card {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 14px;
}

.eg-club-escudo {
	width: 44px;
	height: 44px;
	border-radius: 10px;
	background: linear-gradient(145deg, #1a2c4a, #0d1a30);
	border: 1px solid rgba(255, 140, 0, 0.3);
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: 'Rajdhani', sans-serif;
	font-weight: 700;
	color: #ff8c00;
	font-size: 16px;
	flex-shrink: 0;
}

.eg-club-nombre { color: #fff; font-weight: 600; font-size: 14px; }
.eg-club-division { color: #8a93a6; font-size: 12px; }
.eg-sin-club { font-size: 13px; color: #8a93a6; margin: 0 0 14px; }
.eg-sin-club strong { color: #d0d0d0; }

.eg-stats-mini-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 10px;
}

.eg-stat-mini {
	background: rgba(255, 140, 0, 0.06);
	border-radius: 10px;
	padding: 10px;
	text-align: center;
}

.eg-stat-mini .eg-n {
	font-family: 'Rajdhani', sans-serif;
	font-weight: 700;
	font-size: 20px;
	color: #fff;
}

.eg-stat-mini .eg-l {
	font-size: 10px;
	color: #8a93a6;
	text-transform: uppercase;
	margin-top: 2px;
}

.eg-aviso-dt {
	font-size: 12px;
	color: #8a93a6;
	margin: 12px 0 0;
}

.eg-footer-perfil {
	text-align: center;
	margin-top: 8px;
}

.eg-link-salir {
	color: #8a93a6;
	font-size: 13px;
	text-decoration: none;
	border-bottom: 1px solid transparent;
}

.eg-link-salir:hover { color: #ff8c00; border-color: #ff8c00; }

@media (max-width: 640px) {
	.eg-hero-perfil { grid-template-columns: 1fr; text-align: center; }
	.eg-avatar-wrap { margin: 0 auto; }
	.eg-badges { justify-content: center; }
	.eg-stat-lateral { border-left: none; border-top: 1px solid rgba(255, 255, 255, 0.08); padding-left: 0; padding-top: 14px; }
	.eg-grid-secciones { grid-template-columns: 1fr; }
	.eg-fila-dato { flex-direction: column; align-items: flex-start; gap: 4px; }
}

/* =====================================================================
   Modal de recorte de foto de perfil (Cropper.js)
   ===================================================================== */

.eg-modal-recorte-foto {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.85);
	z-index: 99999;
	align-items: center;
	justify-content: center;
	padding: 16px;
}

.eg-modal-recorte-caja {
	background: #0a1830;
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 14px;
	padding: 20px;
	width: 100%;
	max-width: 480px;
}

.eg-modal-recorte-caja h3 {
	margin: 0 0 4px;
	color: #fff;
}

.eg-modal-recorte-imagen-wrap {
	width: 100%;
	height: 320px;
	margin: 14px 0;
	background: #000;
	border-radius: 8px;
	overflow: hidden;
}

.eg-modal-recorte-imagen-wrap img {
	display: block;
	max-width: 100%;
}

.eg-modal-recorte-botones {
	display: flex;
	justify-content: flex-end;
	gap: 10px;
}
