/*
 * Diseño y Sistema Visual - LC_Cobranza
 * Estilo Premium Moderno para la Academia Deportiva.
 */

:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary: #475569;
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --table-th-bg: #f1f5f9;
    --table-th-text: #475569;
    --table-tr-bg: #ffffff;
    --table-tr-hover: #f8fafc;
    --table-td-border: #f1f5f9;
    --row-success-bg: rgba(220, 252, 231, 0.5);
    --row-danger-bg: rgba(254, 226, 226, 0.5);
    --row-success-hover-bg: rgba(220, 252, 231, 0.8);
    --row-danger-hover-bg: rgba(254, 226, 226, 0.8);
    
    /* Colores de Estatus */
    --status-pagado-bg: #dcfce7;
    --status-pagado-text: #166534;
    --status-pendiente-bg: #fef9c3;
    --status-pendiente-text: #854d0e;
    --status-inactivo-bg: #fee2e2;
    --status-inactivo-text: #991b1b;
    --status-suspendido-bg: #ffedd5;
    --status-suspendido-text: #9a3412;
    
    /* Layout */
    --sidebar-width: 260px;
    --sidebar-bg: #0f172a;
    --sidebar-hover: #1e293b;
    --card-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05);
    --card-hover-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: 'Outfit', 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 0.95rem;
    overflow-x: hidden;
}

/* Layout General */
.wrapper {
    display: flex;
    width: 100%;
    align-items: stretch;
}

/* Sidebar Estilo */
#sidebar {
    min-width: var(--sidebar-width);
    max-width: var(--sidebar-width);
    background: var(--sidebar-bg);
    color: #f1f5f9;
    transition: all 0.3s;
    min-height: 100vh;
    box-shadow: 4px 0 10px rgba(0,0,0,0.1);
    z-index: 100;
}

#sidebar .sidebar-header {
    padding: 16px 12px;
    background: #020617;
    border-bottom: 1px solid #1e293b;
}

.sidebar-logo-container {
    width: 100%;
    text-align: center;
    margin-top: 10px;
    padding: 5px 0;
}

.sidebar-logo-animated {
    max-width: 100%;
    max-height: 160px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: inline-block;
    transition: transform 0.3s ease;
}

.sidebar-logo-animated:hover {
    transform: scale(1.05);
}

#sidebar .sidebar-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: 0.5px;
    color: #ffffff;
}

#sidebar ul.components {
    padding: 15px 0;
}

#sidebar ul li a {
    padding: 12px 24px;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    color: #cbd5e1;
    text-decoration: none;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

#sidebar ul li a i {
    margin-right: 12px;
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

#sidebar ul li a:hover, #sidebar ul li.active > a {
    color: #ffffff;
    background: var(--sidebar-hover);
    border-left-color: var(--primary);
}

/* Main Content Area */
#content {
    width: 100%;
    padding: 30px;
    min-height: 100vh;
    transition: all 0.3s;
}

/* Cards Premium */
.card-premium {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}

.card-premium:hover {
    transform: translateY(-2px);
    box-shadow: var(--card-hover-shadow);
}

/* Badges de Estado */
.badge-status {
    padding: 6px 12px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    display: inline-block;
}

.badge-pagado {
    background-color: var(--status-pagado-bg);
    color: var(--status-pagado-text);
}

.badge-pendiente {
    background-color: var(--status-pendiente-bg);
    color: var(--status-pendiente-text);
}

.badge-inactivo, .badge-inactiva {
    background-color: var(--status-inactivo-bg);
    color: var(--status-inactivo-text);
}

.badge-suspendido {
    background-color: var(--status-suspendido-bg);
    color: var(--status-suspendido-text);
}

/* Alertas de Cobro */
.debt-alert-high {
    border-left: 4px solid #ef4444 !important;
}

.debt-alert-medium {
    border-left: 4px solid #f59e0b !important;
}

/* Tablas Modernas */
.table-premium {
    width: 100% !important;
    border-collapse: separate;
    border-spacing: 0 8px;
}

.table-premium thead th {
    background-color: var(--table-th-bg);
    border: none;
    color: var(--table-th-text);
    font-weight: 600;
    padding: 12px 16px;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

.table-premium tbody tr {
    background: var(--table-tr-bg);
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
    border-radius: 8px;
    transition: background-color 0.2s;
}

.table-premium tbody tr:hover {
    background-color: var(--table-tr-hover);
}

.table-premium tbody td {
    padding: 14px 16px;
    border-top: 1px solid var(--table-td-border);
    border-bottom: 1px solid var(--table-td-border);
    vertical-align: middle;
}

.table-premium tbody td:first-child {
    border-left: 1px solid var(--table-td-border);
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}

.table-premium tbody td:last-child {
    border-right: 1px solid var(--table-td-border);
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

/* Dashboard Metrics */
.metric-card {
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    box-shadow: var(--card-shadow);
}

.metric-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 15px;
}

/* Login Page custom styles */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at top right, #1e293b, #0f172a);
}

.login-card {
    width: 100%;
    max-width: 400px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.3);
    padding: 30px;
}

/* Responsive side menu styling */
@media(max-width: 768px) {
    #sidebar {
        margin-left: calc(-1 * var(--sidebar-width));
    }
    #sidebar.active {
        margin-left: 0;
    }
    #sidebarCollapse span {
        display: none;
    }
}

/* Sidebar Logo Hover Animation - Premium 3D perspective & Glow */
.sidebar-logo-container {
    padding: 12px;
    display: inline-block;
    cursor: pointer;
    perspective: 1000px;
}

.sidebar-logo-animated {
    width: 179px;
    height: 124px;
    object-fit: contain;
    /* Evitar pixeles utilizando suavizado bilinear estándar */
    image-rendering: auto;
    border-radius: 12px;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1), filter 0.6s ease;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.15));
}

.sidebar-logo-container:hover .sidebar-logo-animated {
    transform: translateY(-8px) scale(1.06) rotateY(12deg) rotateX(6deg);
    filter: drop-shadow(0 15px 25px rgba(37, 99, 235, 0.45)) drop-shadow(0 2px 5px rgba(37, 99, 235, 0.2));
}

/* Colores de Fila para Cobranza (Verde/Rojo) */
.table-premium tbody tr.table-success-row td {
    background-color: var(--row-success-bg) !important;
    color: var(--text-main);
}
.table-premium tbody tr.table-danger-row td {
    background-color: var(--row-danger-bg) !important;
    color: var(--text-main);
}
.table-premium tbody tr.table-success-row td:first-child {
    border-left: 4px solid var(--status-pagado-text) !important;
}
.table-premium tbody tr.table-danger-row td:first-child {
    border-left: 4px solid var(--status-inactivo-text) !important;
}

/* Efectos de Hover para Filas de Estado */
.table-premium tbody tr.table-success-row:hover td {
    background-color: var(--row-success-hover-bg) !important;
}
.table-premium tbody tr.table-danger-row:hover td {
    background-color: var(--row-danger-hover-bg) !important;
}

/* ----------------------------------------------------
   ESTILOS DE WIDGETS FINANCIEROS PREMIUM Y MODERNOS
   ---------------------------------------------------- */
.metric-icon-glowing {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
}

.card-premium:hover .metric-icon-glowing {
    transform: scale(1.1) rotate(6deg);
}

.bg-success-light {
    background-color: rgba(34, 197, 94, 0.1);
    box-shadow: 0 0 15px rgba(34, 197, 94, 0.05);
}
.bg-primary-light {
    background-color: rgba(37, 99, 235, 0.1);
    box-shadow: 0 0 15px rgba(37, 99, 235, 0.05);
}
.bg-danger-light {
    background-color: rgba(239, 68, 68, 0.1);
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.05);
}

/* ----------------------------------------------------
   ESTILOS DE LOGO DE MARCA (MALLA ADMINISTRATIVA)
   ---------------------------------------------------- */
.brand-logo-text {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: 'Outfit', 'Inter', system-ui, -apple-system, sans-serif;
    color: #ffffff;
    user-select: none;
}

.brand-title-main {
    font-size: 2rem;
    font-weight: 300;
    letter-spacing: 0.22em;
    line-height: 1.1;
    color: #ffffff;
    text-transform: uppercase;
}

.brand-subtitle-sub {
    font-size: 0.62rem;
    font-weight: 400;
    letter-spacing: 0.58em;
    color: #94a3b8;
    text-transform: uppercase;
    margin-top: 0.4rem;
    margin-left: 0.58em; /* Compensa el letter-spacing del último carácter */
}

/* ----------------------------------------------------
   ESTILOS DE WIDGETS MODERNOS E ILUSTRADOS (ESTILO wit.png)
   ---------------------------------------------------- */
.modern-widget-card {
    position: relative;
    display: flex;
    align-items: center;
    background-color: #0f172a; /* Slate 900 */
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 16px 20px;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.25s;
    overflow: hidden;
    height: 125px; /* Altura fija uniforme para todas las tarjetas */
    z-index: 1;
}

.modern-widget-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 35px -10px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.15);
}

/* Efecto de resplandor radial en la esquina izquierda */
.modern-widget-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -35%;
    width: 90%;
    height: 200%;
    background: radial-gradient(circle, rgba(var(--widget-glow-rgb), 0.22) 0%, transparent 60%);
    pointer-events: none;
    z-index: 1;
    border-radius: 50%;
}

/* Variaciones por Tema y Colores de Resplandor Luminous */
.widget-theme-green {
    --widget-accent: #34d399; /* Mint luminous */
    --widget-glow-rgb: 52, 211, 153;
}

.widget-theme-red {
    --widget-accent: #fb7185; /* Rose/Red luminous */
    --widget-glow-rgb: 251, 113, 133;
}

.widget-theme-orange {
    --widget-accent: #fb923c; /* Orange luminous */
    --widget-glow-rgb: 251, 146, 60;
}

.widget-theme-blue {
    --widget-accent: #60a5fa; /* Blue luminous */
    --widget-glow-rgb: 96, 165, 250;
}

/* Contenedor del Círculo / Icono con Estilo Glass */
.widget-icon-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 18px;
    z-index: 2;
}

.widget-icon-glass-badge {
    width: 54px;
    height: 54px;
    background: linear-gradient(135deg, rgba(var(--widget-glow-rgb), 0.25) 0%, rgba(var(--widget-glow-rgb), 0.05) 100%);
    border: 1px solid rgba(var(--widget-glow-rgb), 0.35);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.3s;
}

.modern-widget-card:hover .widget-icon-glass-badge {
    transform: scale(1.08) rotate(3deg);
    border-color: rgba(var(--widget-glow-rgb), 0.6);
}

.widget-icon-glass-badge i {
    font-size: 1.45rem;
    color: var(--widget-accent);
    filter: drop-shadow(0 2px 8px rgba(var(--widget-glow-rgb), 0.4));
}

/* Contenedor de Texto y Valores */
.widget-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    flex: 1;
    z-index: 2;
}

.widget-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--widget-accent);
    margin-bottom: 2px;
    letter-spacing: -0.1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.widget-value {
    font-size: 1.85rem;
    font-weight: 800;
    color: #ffffff; /* Blanco puro en fondo oscuro */
    line-height: 1.1;
    margin-bottom: 4px;
    letter-spacing: -0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Línea separadora horizontal del color del tema */
.widget-separator {
    width: 28px;
    height: 2px;
    background-color: var(--widget-accent);
    margin-bottom: 6px;
    border-radius: 1px;
    opacity: 0.85;
}

.widget-footer {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.76rem;
    color: #94a3b8; /* Slate 400 */
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.widget-footer i {
    font-size: 0.8rem;
    color: var(--widget-accent);
}

.widget-footer strong {
    color: #cbd5e1; /* Slate 300 */
    font-weight: 700;
}

/* Animación de pulso para alertas de suspensión (Efecto Halo Premium) */
@keyframes alertPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5), 0 0 0 0 rgba(239, 68, 68, 0.2);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(239, 68, 68, 0), 0 0 0 12px rgba(239, 68, 68, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0), 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

.badge-alert-pulse {
    animation: alertPulse 2.4s cubic-bezier(0.16, 1, 0.3, 1) infinite;
    display: inline-block;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

/* ====================================================
   ESTILOS PREMIUM DEL CENTRO DE AYUDA (ayuda.php)
   ==================================================== */

.help-search-container {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-radius: 16px;
    padding: 35px;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1);
    color: #ffffff;
    position: relative;
    overflow: hidden;
}

.help-search-container::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.help-search-input-group {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.help-search-input-group i {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 1.2rem;
}

.help-search-input {
    width: 100%;
    padding: 16px 20px 16px 55px;
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    font-size: 1.05rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(8px);
}

.help-search-input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 20px rgba(37, 99, 235, 0.35);
}

.help-search-input::placeholder {
    color: #94a3b8;
}

/* Categorías y Tarjetas del Manual */
.help-category-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--card-shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.help-category-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary) 0%, rgba(37, 99, 235, 0.2) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.help-category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-hover-shadow);
    border-color: rgba(37, 99, 235, 0.2);
}

.help-category-card:hover::after {
    opacity: 1;
}

.help-category-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 20px;
    background: rgba(37, 99, 235, 0.08);
    color: var(--primary);
    transition: all 0.3s ease;
}

.help-category-card:hover .help-category-icon {
    background: var(--primary);
    color: #ffffff;
    transform: scale(1.08) rotate(3deg);
}

.help-category-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 8px;
}

.help-category-desc {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Guías Detalladas (Acordeones y Pestañas) */
.help-nav-pills {
    gap: 8px;
}

.help-nav-pills .nav-link {
    color: var(--text-muted);
    border-radius: 9999px;
    padding: 10px 20px;
    font-weight: 500;
    font-size: 0.9rem;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    transition: all 0.25s ease;
}

.help-nav-pills .nav-link:hover {
    color: var(--text-main);
    background: rgba(37, 99, 235, 0.05);
    border-color: rgba(37, 99, 235, 0.2);
}

.help-nav-pills .nav-link.active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.25);
}

.help-accordion .accordion-item {
    border: 1px solid var(--border-color) !important;
    border-radius: 12px !important;
    margin-bottom: 12px;
    overflow: hidden;
    background: var(--bg-card);
    box-shadow: 0 1px 3px rgba(0,0,0,0.01);
}

.help-accordion .accordion-header {
    border: none;
}

.help-accordion .accordion-button {
    font-weight: 600;
    color: var(--text-main);
    background-color: var(--bg-card);
    padding: 18px 20px;
    box-shadow: none !important;
}

.help-accordion .accordion-button:not(.collapsed) {
    color: var(--primary);
    background-color: rgba(37, 99, 235, 0.03);
    border-bottom: 1px solid var(--border-color);
}

.help-accordion .accordion-body {
    padding: 20px;
    line-height: 1.6;
    color: var(--text-main);
    font-size: 0.92rem;
}

.help-accordion .accordion-body code {
    background: rgba(0,0,0,0.04);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    color: #e11d48;
}

.help-step-list {
    list-style: none;
    padding-left: 0;
}

.help-step-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
}

.help-step-number {
    width: 26px;
    height: 26px;
    background: var(--primary);
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    margin-right: 12px;
    flex-shrink: 0;
    margin-top: 2px;
    box-shadow: 0 2px 5px rgba(37, 99, 235, 0.2);
}

.help-step-content {
    flex: 1;
}

.help-alert-badge {
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.72rem;
    text-transform: uppercase;
}

/* ====================================================
   ESTILOS DEL CHATBOT ASISTENTE FLOTANTE
   ==================================================== */

#help-widget-container {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 9999;
    font-family: 'Outfit', sans-serif;
}

/* Botón flotante */
.help-widget-trigger {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, #1d4ed8 100%);
    color: #ffffff;
    border: none;
    outline: none;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}

.help-widget-trigger:hover {
    transform: scale(1.08) translateY(-3px);
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.55);
}

.help-widget-trigger i {
    font-size: 1.6rem;
    transition: transform 0.4s ease;
}

.help-widget-trigger.active i {
    transform: rotate(90deg);
}

.help-widget-trigger .notification-dot {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 14px;
    height: 14px;
    background-color: #ef4444;
    border: 2px solid #ffffff;
    border-radius: 50%;
    animation: alertPulse 1.8s infinite;
}

/* Ventana de chat */
.help-chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    height: 520px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15), 0 5px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.8) translateY(30px);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-origin: bottom right;
}

.help-chat-window.open {
    transform: scale(1) translateY(0);
    opacity: 1;
    pointer-events: auto;
}

/* Cabecera del chat */
.help-chat-header {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #ffffff;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.help-chat-title-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.help-chat-avatar {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(37, 99, 235, 0.2);
    border: 1px solid rgba(37, 99, 235, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.15rem;
}

.help-chat-status {
    display: flex;
    flex-direction: column;
}

.help-chat-status-name {
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.2;
}

.help-chat-status-indicator {
    font-size: 0.72rem;
    color: #22c55e;
    display: flex;
    align-items: center;
    gap: 4px;
}

.help-chat-status-indicator::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background-color: #22c55e;
    border-radius: 50%;
}

.help-chat-close {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 1.1rem;
    transition: color 0.2s;
    padding: 4px;
}

.help-chat-close:hover {
    color: #ffffff;
}

/* Cuerpo de mensajes */
.help-chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: var(--bg-main);
    display: flex;
    flex-direction: column;
    gap: 15px;
    scroll-behavior: smooth;
}

/* Burbujas de chat */
@keyframes msgFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.help-chat-msg {
    max-width: 88%;
    padding: 14px 18px;
    border-radius: 16px;
    font-size: 0.92rem;
    line-height: 1.6;
    animation: msgFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.help-chat-msg.bot {
    background-color: #ffffff;
    color: #1e293b; /* Slate 800 para mejor contraste */
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
    border: 1px solid #e2e8f0;
    border-left: 3px solid var(--primary); /* Línea de acento para estilo premium */
}

.help-chat-msg.user {
    background: linear-gradient(135deg, var(--primary) 0%, #1d4ed8 100%);
    color: #ffffff;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.2);
}

.help-chat-msg p {
    margin-bottom: 0;
}

.help-chat-msg p + p {
    margin-top: 10px;
}

.help-chat-msg p + ol, .help-chat-msg p + ul {
    margin-top: 10px;
}

/* Espaciado para listas y pasos instructivos */
.help-chat-msg ol, .help-chat-msg ul {
    padding-left: 20px;
    margin-bottom: 0;
}

.help-chat-msg li {
    margin-bottom: 8px;
}

.help-chat-msg li:last-child {
    margin-bottom: 0;
}

/* Resaltar palabras clave en las respuestas */
.help-chat-msg.bot strong {
    color: var(--primary);
    font-weight: 600;
}

.help-chat-msg.bot code {
    background: rgba(0, 0, 0, 0.05);
    color: #ef4444;
    padding: 2px 5px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.85rem;
}

.help-chat-msg hr {
    margin: 10px 0;
    opacity: 0.15;
}

/* Sugerencias e interacciones */
.help-chat-options {
    padding: 15px 20px;
    background-color: var(--bg-card);
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 240px;
    overflow-y: auto;
}

.help-chat-options-title {
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.help-chat-option-btn {
    text-align: left;
    background: rgba(37, 99, 235, 0.04);
    border: 1px solid rgba(37, 99, 235, 0.08);
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: normal;
    word-break: break-word;
    line-height: 1.35;
}

.help-chat-option-btn:hover {
    background-color: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    transform: translateY(-1px) translateX(3px);
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.15);
}

.help-chat-option-btn:hover i {
    color: #ffffff !important;
}

/* Pie del chat */
.help-chat-footer {
    padding: 12px 20px;
    background-color: var(--bg-card);
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.help-chat-footer a {
    font-size: 0.78rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color 0.2s;
}

.help-chat-footer a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* Animación de escritura (typing indicator) */
.typing-dots {
    display: flex;
    gap: 4px;
    align-items: center;
    padding: 4px 0;
}

.typing-dots span {
    width: 6px;
    height: 6px;
    background-color: var(--text-muted);
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out both;
}

.typing-dots span:nth-child(1) { animation-delay: -0.32s; }
.typing-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes typing {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

@media(max-width: 480px) {
    .help-chat-window {
        width: 320px;
        height: 460px;
        bottom: 75px;
    }
}

/* Calidad y Estilo Premium de Fotografías de Atletas */
.athlete-avatar {
    object-fit: cover;
    image-rendering: -webkit-optimize-contrast; /* Optimizar contraste y nitidez en Chrome/Safari/Edge */
    image-rendering: crisp-edges;               /* Para otros navegadores */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.06);  /* Sombra sutil */
    border: 2px solid #ffffff;                  /* Marco blanco de separación */
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease;
}
.athlete-avatar:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.12);
}









