/* ==========================================
   1. VARIABLES Y RESET GLOBAL
   ========================================== */
:root {
    --primary: #00f2ff; /* Cian Neón */
    --secondary: #00ff88; /* Verde Esmeralda (Broker Real) */
    --accent-blue: #0051ff; /* Azul Exnova Banner */
    --demo-orange: #ff9800; /* Naranja Broker Demo */
    --error: #ff3355;
    --warning: #ffeb3b;
    --bg-dark: #0d1117;
    --glass: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --neon-glow: 0 0 15px rgba(0, 242, 255, 0.3);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Segoe UI', Roboto, -apple-system, sans-serif; }

body {
    background: radial-gradient(circle at center, #1a1e29, #0d1117);
    color: #ffffff;
    min-height: 100vh;
    overflow-x: hidden;
}

body.login-bg {
    display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 20px 0;
}

.hidden { display: none !important; }

/* ==========================================
   2. ANIMACIONES Y DECORACIÓN
   ========================================== */
.neon-highlight { color: var(--primary); text-shadow: var(--neon-glow); font-weight: 800; }

@keyframes logoBreathing {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 10px rgba(0, 242, 255, 0.4)); }
    50% { transform: scale(1.05); filter: drop-shadow(0 0 20px rgba(0, 242, 255, 0.6)); }
}
.main-logo-anim, .nav-logo-small { animation: logoBreathing 4s infinite ease-in-out; }

/* ==========================================
   3. COMPONENTES DE CRISTAL (GLASS)
   ========================================== */
.glass-panel {
    background: var(--glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

/* ==========================================
   4. FORMULARIOS E INPUTS (INDEX & SETUP)
   ========================================== */
.login-container { width: 92%; max-width: 420px; padding: 40px 30px; text-align: center; }

.input-group { position: relative; margin-bottom: 18px; }
.input-group i {
    position: absolute; left: 18px; top: 50%; transform: translateY(-50%);
    color: var(--primary); font-size: 1.1rem;
}

input, select {
    width: 100%; padding: 14px 16px 14px 50px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--glass-border);
    border-radius: 14px; color: #fff; font-size: 1rem;
    outline: none; transition: var(--transition);
}
input:focus, select:focus { border-color: var(--primary); box-shadow: 0 0 15px rgba(0, 242, 255, 0.2); }

/* Select Especial */
select { appearance: none; background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300f2ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e"); background-repeat: no-repeat; background-position: right 15px center; background-size: 15px; }
select option { background: #1a1e29; color: #fff; }

.btn-neon {
    width: 100%; padding: 16px; background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #000; border: none; border-radius: 14px; font-weight: 800; cursor: pointer; transition: 0.3s;
}
.btn-neon:hover { transform: translateY(-2px); box-shadow: 0 10px 20px rgba(0, 242, 255, 0.3); }

/* ==========================================
   5. HEADER Y NAVBAR DASHBOARD
   ========================================== */
.nav-bar {
    width: 95%; max-width: 1280px; margin: 15px auto;
    padding: 12px 25px; display: flex; justify-content: space-between; align-items: center;
}
.nav-logo-small { width: 35px; height: auto; }

.user-profile-nav { display: flex; align-items: center; gap: 12px; padding-right: 15px; border-right: 1px solid var(--glass-border); cursor: pointer; }
.nav-avatar { width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--primary); object-fit: cover; }
.nav-user-info { display: flex; flex-direction: column; line-height: 1.2; }
.nav-greeting { font-size: 0.65rem; color: #8b949e; text-transform: uppercase; }
.nav-user-info strong { font-size: 0.9rem; color: #fff; }

.status-wrapper { display: flex; align-items: center; gap: 8px; background: rgba(0,0,0,0.3); padding: 6px 14px; border-radius: 50px; border: 1px solid var(--glass-border); font-size: 0.7rem; font-weight: 700; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; }
.status-dot.online { background: var(--secondary); box-shadow: 0 0 10px var(--secondary); }
.status-dot.offline { background: var(--error); box-shadow: 0 0 10px var(--error); }

/* ==========================================
   6. HEADER BRANDING (ID & HALL OF FAME)
   ========================================== */
.trader-brand-header { display: flex; flex-direction: column; align-items: center; margin: 10px 0 30px; gap: 15px; }
.id-badge { background: rgba(0, 242, 255, 0.1); border: 1px solid rgba(0, 242, 255, 0.3); padding: 8px 24px; border-radius: 50px; font-weight: 800; color: var(--primary); font-size: 0.85rem; letter-spacing: 1px; }

.hall-of-fame-slider { width: 100%; max-width: 820px; overflow: hidden; position: relative; padding: 12px 0; border-top: 1px solid var(--glass-border); border-bottom: 1px solid var(--glass-border); }
.slider-track { display: flex; width: calc(300px * 10); animation: scrollInfinite 25s linear infinite; }
.hall-item { width: 300px; flex-shrink: 0; font-size: 0.8rem; font-weight: 700; text-align: center; }
.hall-item span { color: var(--secondary); font-weight: 900; }
@keyframes scrollInfinite { 0% { transform: translateX(0); } 100% { transform: translateX(calc(-300px * 5)); } }

/* ==========================================
   7. GRID Y PANELES DASHBOARD
   ========================================== */
.dashboard-grid { display: grid; grid-template-columns: 1fr; gap: 20px; width: 95%; max-width: 1280px; margin: 0 auto; }
.panel-padding { padding: 20px; }

/* ==========================================
   9. MÉTRICAS Y GRÁFICAS
   ========================================== */
.chart-header-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.chart-filters { display: flex; gap: 5px; background: rgba(0,0,0,0.3); padding: 4px; border-radius: 10px; }
.btn-filter { background: transparent; border: none; color: #8b949e; padding: 4px 8px; font-size: 0.65rem; font-weight: 700; cursor: pointer; border-radius: 6px; }
.btn-filter.active { background: var(--primary); color: #000; }

.results-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 10px; }
.res-item { background: rgba(0,0,0,0.2); padding: 12px 8px; border-radius: 12px; text-align: center; border: 1px solid var(--glass-border); }
.res-label { display: block; font-size: 0.55rem; color: #8b949e; margin-bottom: 4px; font-weight: 700; }
.res-value { font-size: 1rem; font-weight: 800; }

/* ==========================================
   10. BOTONES REPLICA Y ACCIÓN (PC/DASHBOARD)
   ========================================== */
.btn-replica-banner {
    width: 100%; padding: 20px;
    background: linear-gradient(135deg, var(--accent-blue), #00c6ff);
    color: white; border: none; border-radius: 16px;
    font-weight: 900; text-transform: uppercase; cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 81, 255, 0.3);
    transition: 0.3s; font-size: 1rem; letter-spacing: 1px;
    display: flex; justify-content: center; align-items: center; gap: 10px;
}
.btn-replica-banner:hover { transform: translateY(-3px); filter: brightness(1.2); }
.btn-replica-banner.active-btn { background: linear-gradient(135deg, #ff3355, #ff6b81); box-shadow: 0 10px 30px rgba(255, 51, 85, 0.3); }

/* ==========================================
   11. FOOTER ENTERPRISE
   ========================================== */
.site-footer { margin-top: 50px; text-align: center; padding: 40px 20px; border-top: 1px solid var(--glass-border); }
.security-banner { background: rgba(255, 235, 59, 0.05); border: 1px solid rgba(255, 235, 59, 0.2); padding: 12px 25px; border-radius: 50px; color: #ffeb3b; font-size: 0.75rem; display: inline-flex; align-items: center; gap: 10px; margin-bottom: 25px; }
.legal-links-footer a { color: var(--primary); text-decoration: none; font-size: 0.8rem; font-weight: 600; margin: 0 10px; transition: 0.3s; }
.legal-links-footer a:hover { text-shadow: var(--neon-glow); }

/* ==========================================
   12. MEDIA QUERIES (PC, TABLET, MÓVIL)
   ========================================== */

/* TABLETS (min 768px) */
@media (min-width: 768px) {
    .dashboard-grid { grid-template-columns: 1fr; }
    .risk-inputs { grid-template-columns: repeat(4, 1fr); }
    .section-divider, .full-row { grid-column: span 4; }
    .results-summary { grid-template-columns: repeat(3, 1fr); }
}

/* PC (min 1024px) */
@media (min-width: 1024px) {
    .dashboard-grid { grid-template-columns: 380px 1fr; align-items: start; }
    .risk-inputs { grid-template-columns: 1fr 1fr; }
    .section-divider, .full-row { grid-column: span 2; }
}

/* Selector de Idioma Flotante */
.language-selector { position: fixed; bottom: 20px; right: 20px; z-index: 1000; display: flex; gap: 8px; }
.language-selector button { background: rgba(13, 17, 23, 0.9); border: 1px solid var(--glass-border); color: #fff; padding: 8px 12px; border-radius: 10px; font-size: 0.7rem; font-weight: 700; cursor: pointer; transition: 0.3s; }
.language-selector button:hover { background: var(--primary); color: #000; }

/* Notificaciones Toast */
.notification-box { position: fixed; top: 20px; right: 20px; z-index: 10000; }
.toast-notif { background: #1a1e29; padding: 15px 25px; border-radius: 12px; border-left: 4px solid var(--primary); margin-bottom: 10px; box-shadow: 0 10px 30px rgba(0,0,0,0.5); animation: slideIn 0.4s ease-out; }
@keyframes slideIn { from { transform: translateX(100%); } to { transform: translateX(0); } }

/* ==========================================
   1. TEMA GLOBAL Y VARIABLES
   ========================================== */
:root {
    --primary: #00f2ff;
    --secondary: #00ff88;
    --accent-blue: #0051ff; /* Azul Exnova */
    --demo-orange: #ff9800; /* Naranja Exnova */
    --error: #ff3355;
    --warning: #ffeb3b;
    --bg-dark: #0d1117;
    --glass: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --neon-glow: 0 0 15px rgba(0, 242, 255, 0.3);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Segoe UI', Roboto, sans-serif; }

body {
    background: radial-gradient(circle at center, #1a1e29, #0d1117);
    color: #ffffff;
    min-height: 100vh;
    overflow-x: hidden;
}

body.login-bg {
    display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 20px 0;
}

.hidden { display: none !important; }

/* ==========================================
   2. ANIMACIONES Y DECORACIÓN
   ========================================== */
.neon-highlight { color: var(--primary) !important; text-shadow: var(--neon-glow) !important; font-weight: 800; }

@keyframes logoBreathing {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 10px rgba(0, 242, 255, 0.4)); }
    50% { transform: scale(1.05); filter: drop-shadow(0 0 20px rgba(0, 242, 255, 0.6)); }
}
.main-logo-anim, .nav-logo-small { animation: logoBreathing 4s infinite ease-in-out; }

/* ==========================================
   3. COMPONENTES GLASS Y FORMULARIOS
   ========================================== */
.glass-panel {
    background: var(--glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 28px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
}

.login-container { width: 92%; max-width: 420px; padding: 40px 30px; text-align: center; }

.input-group { position: relative; margin-bottom: 18px; }
.input-group i {
    position: absolute; left: 18px; top: 50%; transform: translateY(-50%);
    color: var(--primary); font-size: 1.1rem;
}

input, select {
    width: 100%; padding: 14px 16px 14px 52px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--glass-border);
    border-radius: 12px; color: #fff; font-size: 1rem; outline: none;
}
input:focus, select:focus { border-color: var(--primary); box-shadow: 0 0 15px rgba(0, 242, 255, 0.2); }

/* Checkbox Personalizado del Index */
.custom-checkbox { display: inline-flex; align-items: center; cursor: pointer; gap: 10px; }
.custom-checkbox input { display: none; }
.checkmark {
    width: 20px; height: 20px; border: 1px solid var(--primary);
    border-radius: 5px; position: relative; display: inline-block;
}
.custom-checkbox input:checked + .checkmark { background: var(--primary); }
.custom-checkbox input:checked + .checkmark::after {
    content: "\f00c"; font-family: "Font Awesome 6 Free"; font-weight: 900;
    color: #000; font-size: 12px; position: absolute; left: 3px; top: 1px;
}
.legal-text { font-size: 13px; color: #8b949e; }
.legal-text a { color: var(--primary); text-decoration: none; font-weight: 600; }

/* Botones */
.btn-neon {
    width: 100%; padding: 18px; background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #000; border: none; border-radius: 16px; font-weight: 800; cursor: pointer; transition: 0.3s;
}
.btn-neon:hover { transform: translateY(-3px); box-shadow: 0 10px 25px rgba(0, 242, 255, 0.4); }

/* ==========================================
   4. HEADER BRANDING (ID & HALL OF FAME)
   ========================================== */
.trader-brand-header { display: flex; flex-direction: column; align-items: center; margin: 10px 0 30px; gap: 15px; }
.id-badge { background: rgba(0, 242, 255, 0.1); border: 1px solid var(--primary); padding: 8px 25px; border-radius: 50px; font-weight: 800; color: var(--primary); backdrop-filter: blur(10px); }

.hall-of-fame-slider { width: 100%; max-width: 820px; overflow: hidden; background: rgba(0,0,0,0.2); border-radius: 50px; padding: 10px 0; border: 1px solid var(--glass-border); }
.slider-track { display: flex; width: max-content; animation: scrollInfinite 30s linear infinite; }
.hall-item { padding: 0 40px; font-size: 0.8rem; font-weight: 700; white-space: nowrap; color: #fff; display: flex; align-items: center; gap: 8px; }
.hall-item span { color: var(--secondary); text-shadow: 0 0 10px rgba(0, 255, 136, 0.4); }
@keyframes scrollInfinite { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* ==========================================
   5. DASHBOARD: BALANCES Y BOTONES ESPECIALES
   ========================================== */
.stat-card.real { border-bottom: 3px solid var(--secondary) !important; }
.stat-card.real i, .stat-card.real h2 { color: var(--secondary); }
.stat-card.demo { border-bottom: 3px solid var(--demo-orange) !important; }
.stat-card.demo i, .stat-card.demo h2 { color: var(--demo-orange); }

/* Botón Azul Réplica Estilo Exnova */
.btn-replica-banner {
    width: 100%; padding: 22px; background: linear-gradient(135deg, var(--accent-blue), #00c6ff);
    color: white; border: none; border-radius: 16px; font-weight: 900; text-transform: uppercase; cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 81, 255, 0.3); transition: 0.3s; font-size: 1.1rem;
}
.btn-replica-banner:hover { transform: translateY(-3px); filter: brightness(1.2); box-shadow: 0 15px 40px rgba(0, 81, 255, 0.5); }
.btn-replica-banner.active-btn { background: linear-gradient(135deg, #ff3355, #ff6b81); box-shadow: 0 10px 30px rgba(255, 51, 85, 0.3); }

/* ==========================================
   6. GRID Y PANELES (PC & MÓVIL)
   ========================================== */
.dashboard-grid { display: grid; grid-template-columns: 1fr; gap: 20px; width: 95%; max-width: 1280px; margin: 0 auto; }
@media (min-width: 1024px) {
    .dashboard-grid { grid-template-columns: 380px 1fr; align-items: start; }
}

.results-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 15px; }
.res-item { background: rgba(0,0,0,0.2); padding: 15px 10px; border-radius: 16px; text-align: center; border: 1px solid var(--glass-border); }
.res-value { font-size: 1.1rem; font-weight: 800; display: block; }

/* Activos Top */
.asset-row { display: flex; justify-content: space-between; padding: 15px; background: rgba(255,255,255,0.02); border-radius: 12px; margin-bottom: 8px; border: 1px solid var(--glass-border); }
.asset-winrate { color: var(--primary); font-weight: 800; }

/* ==========================================
   7. FOOTER ENTERPRISE SEGURO
   ========================================== */
.site-footer { margin-top: 50px; text-align: center; padding-bottom: 40px; border-top: 1px solid var(--glass-border); padding-top: 30px; }
.security-banner { background: rgba(255, 235, 59, 0.05); border: 1px solid rgba(255, 235, 59, 0.2); padding: 12px 30px; border-radius: 50px; color: #ffeb3b; font-size: 0.75rem; display: inline-flex; align-items: center; gap: 10px; margin-bottom: 25px; }
.legal-links-footer a { color: var(--primary); text-decoration: none; font-size: 0.8rem; font-weight: 600; margin: 0 10px; }

/* ==========================================
   8. NOTIFICACIONES Y OTROS
   ========================================== */
.notification-box { position: fixed; top: 20px; right: 20px; z-index: 9999; }
.toast-notif { background: #1a1e29; padding: 15px 25px; border-radius: 12px; border-left: 4px solid var(--primary); margin-bottom: 10px; box-shadow: 0 10px 30px rgba(0,0,0,0.5); animation: slideIn 0.4s ease-out; }
@keyframes slideIn { from { transform: translateX(100%); } to { transform: translateX(0); } }

.language-selector { position: fixed; bottom: 20px; right: 20px; z-index: 1000; display: flex; gap: 8px; }
.language-selector button { background: rgba(13,17,23,0.9); border: 1px solid var(--glass-border); color:#fff; padding:8px 12px; border-radius:10px; cursor:pointer; }


/* ==========================================
   REPARACIÓN DE ELEMENTOS FALTANTES (DASHBOARD)
   ========================================== */

/* 1. Botón SALIR (btn-danger-outline) */
.btn-danger-outline {
    width: 100%;
    padding: 15px;
    background: rgba(255, 51, 85, 0.05);
    color: var(--error);
    border: 1px solid rgba(255, 51, 85, 0.3);
    border-radius: 12px;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
}

.btn-danger-outline:hover {
    background: var(--error);
    color: #fff;
    box-shadow: 0 5px 15px rgba(255, 51, 85, 0.4);
    transform: translateY(-2px);
}

/* 2. Botón SSID / PERFIL (btn-secondary) */
.btn-secondary {
    width: 100%;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
}

.btn-secondary:hover {
    background: rgba(0, 242, 255, 0.1);
    border-color: var(--primary);
    box-shadow: 0 5px 15px rgba(0, 242, 255, 0.2);
    transform: translateY(-2px);
}

/* 3. Botones del Carrusel (carousel-btn) */
.carousel-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}

.carousel-btn {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--glass-border);
    color: var(--primary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: 0.3s;
    flex-shrink: 0;
}

.carousel-btn:hover {
    background: var(--primary);
    color: #000;
    box-shadow: var(--neon-glow);
    transform: scale(1.1);
}

/* 4. Encabezado de la Gráfica (chart-header) */
.chart-header {
    font-size: 0.85rem;
    font-weight: 800;
    color: #8b949e;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-block;
}

/* 5. Ajuste de GRID para botones de acción rápida */
.quick-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 20px;
}

@media (max-width: 480px) {
    .quick-actions {
        grid-template-columns: 1fr;
    }
}

/* 6. Estilo para los títulos de las secciones (Risk Manager, Masters, etc) */
.panel-title {
    font-size: 0.9rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-transform: uppercase;
}

/* 7. Etiquetas de descripción pequeñas */
.masters-section p {
    font-size: 0.75rem;
    color: #8b949e;
    margin-bottom: 10px;
}

/* ==========================================
   RESTAURACIÓN ESTILOS INDEX (LOGIN)
   ========================================== */

/* 1. Caja del Logo y Títulos */
.logo-box {
    margin-bottom: 30px;
}

.logo-box h2 {
    font-size: 1.4rem;
    margin-top: 15px;
    line-height: 1.3;
    color: #fff;
}

/* 2. Etiqueta Panel Enterprise */
.panel-tag {
    display: inline-block;
    background: rgba(0, 242, 255, 0.1);
    color: var(--primary);
    padding: 5px 15px;
    border-radius: 50px;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 10px;
    border: 1px solid rgba(0, 242, 255, 0.2);
}

/* 3. Pregunta de Depósito (Efecto Dinámico) */
.deposit-question {
    font-size: 0.65rem;
    color: var(--secondary);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-top: 15px;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.4);
    display: block;
    animation: pulseText 2s infinite;
}

@keyframes pulseText {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(0.98); }
}

/* ==========================================
   CORRECCIÓN FILA LEGAL (UNA SOLA LÍNEA)
   ========================================== */

.legal-row {
    display: flex;             /* Alinea checkbox y texto en horizontal */
    align-items: center;       /* Centra verticalmente el check con el texto */
    justify-content: center;   /* Centra todo el bloque en el panel */
    gap: 10px;                 /* Espacio entre el cuadro y el texto */
    margin-bottom: 25px;       /* SEPARACIÓN DEL BOTÓN */
    width: 100%;
    white-space: nowrap;       /* FUERZA UNA SOLA LÍNEA */
}

.legal-text {
    font-size: 13px;           /* Ajuste para que quepa en una línea en móviles */
    color: #8b949e;
    margin: 0 !important;      /* Quita márgenes por defecto del párrafo */
    display: flex;
    gap: 5px;                  /* Espacio entre palabras y links */
}

/* Ajuste fino para el checkbox */
.custom-checkbox {
    display: flex;
    align-items: center;
    position: relative;
    width: 20px;
    height: 20px;
    flex-shrink: 0;            /* Evita que el checkbox se aplaste */
}

/* Responsivo: Si el ID es muy largo o la pantalla muy pequeña, 
   bajamos un poco la fuente para que no se rompa la línea */
@media (max-width: 380px) {
    .legal-text {
        font-size: 11px;
    }
    .legal-row {
        gap: 8px;
    }
}

/* 5. Footer: Créditos del Programador */
.dev-credits {
    margin-top: 20px;
    font-size: 0.75rem;
    color: #8b949e;
    line-height: 1.6;
}

.dev-credits span {
    color: #8b949e;
}

.dev-credits a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
    transition: var(--transition);
}

.dev-credits a:hover {
    color: #fff;
    text-shadow: 0 0 10px var(--primary);
}

.copyright {
    margin-top: 8px;
    font-size: 0.65rem;
    opacity: 0.5;
    letter-spacing: 1px;
}

/* 6. Espaciado del Formulario */
.auth-step {
    width: 100%;
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* SOLO AFECTA A LAS FOTOS DE PERFIL, NO AL LOGO */
.nav-avatar, .podium-avatar, .master-avatar-hz img {
    object-fit: cover;
    background: #000;
    display: block;
}

/* ASEGURA QUE EL LOGO SEA SIEMPRE TRANSPARENTE Y AUTO */
.main-logo-anim {
    width: 120px; /* O el tamaño que prefieras para el login */
    height: auto;
    background: transparent !important;
    object-fit: contain !important;
}


/* ==========================================
   ESTILOS DE MARCA (BRANDING)
   ========================================== */

.brand-name {
    display: flex;
    align-items: baseline; /* Alinea los textos por su base */
    gap: 2px;
    font-weight: 800;
    text-transform: none; /* Mantiene las mayúsculas originales */
}

/* "Auto" en Blanco */
.brand-auto {
    color: #ffffff;
    font-size: 1.2rem;
}

/* "CopyTrader" Resaltado (Cian Neón) */
.brand-copy {
    color: var(--primary);
    text-shadow: var(--neon-glow);
    font-size: 1.2rem;
}

/* "Enterprise" Pequeño al lado */
.brand-enterprise {
    color: rgba(255, 255, 255, 0.5); /* Blanco semi-transparente */
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-left: 5px;
    font-weight: 400;
}

/* Ajuste para que en móviles no se amontone si el logo es grande */
@media (max-width: 480px) {
    .brand-auto, .brand-copy {
        font-size: 1rem;
    }
    .brand-enterprise {
        font-size: 0.55rem;
    }
}

/* ==========================================
   ESTILOS DE LOGO Y TEXTO (ALINEACIÓN PROFESIONAL)
   ========================================== */
.nav-brand-container {
    display: flex;
    align-items: center; 
    gap: 18px; /* Más espacio para elegancia */
}

/* El logo ahora tiene un tamaño base controlado */
.nav-logo-small {
    width: 55px; /* Tamaño más imponente en PC */
    height: auto;
}

.brand-text-wrapper {
    display: flex;
    align-items: baseline;
    gap: 3px;
    flex-wrap: nowrap;
}

/* "Auto" y "CopyTrader" Grandes al tamaño del logo en PC */
.brand-auto, .brand-copy {
    font-size: 1.8rem; /* Tamaño aumentado para igualar impacto del logo */
    font-weight: 800;
    letter-spacing: -0.5px;
}

.brand-auto {
    color: #ffffff;
}

.brand-copy {
    color: var(--primary);
    text-shadow: 0 0 20px rgba(0, 242, 255, 0.4);
}

/* "Enterprise" se mantiene sutil pero alineado */
.brand-enterprise {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-left: 8px;
    font-weight: 600;
}

/* Ajustes Navbar para PC */
.nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 30px;
    width: 95%;
    max-width: 1400px;
}

/* ==========================================
   OPTIMIZACIÓN PARA MÓVIL (RESPONSIVE)
   ========================================== */
@media (max-width: 768px) {
    .nav-logo-small {
        width: 45px; /* Logo un poco más pequeño en tablets */
    }
    .brand-auto, .brand-copy {
        font-size: 1.4rem;
    }
}

@media (max-width: 480px) {
    .nav-bar {
        flex-direction: column; /* Apila para no apretar el contenido */
        padding: 15px 10px;
        gap: 15px;
    }

    .nav-brand-container {
        gap: 10px;
        justify-content: center;
        width: 100%;
    }

    .nav-logo-small {
        width: 40px; /* Tamaño ideal para que quepa el texto al lado */
    }

    .brand-auto, .brand-copy {
        font-size: 1.2rem; /* Tamaño ajustado para pantallas pequeñas */
    }

    .brand-enterprise {
        font-size: 0.6rem;
        margin-left: 4px;
        letter-spacing: 1px;
    }

    .nav-right-side {
        width: 100%;
        justify-content: space-between; /* Alinea perfil e idioma en los extremos */
        padding: 0 10px;
    }
}

/* ==========================================
   ESTILOS ADICIONALES PARA EL DASHBOARD
   ========================================== */
.asset-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    margin-bottom: 8px;
}

.asset-name { font-weight: 700; color: #fff; font-size: 0.85rem; }
.asset-winrate { color: var(--primary); font-weight: 800; font-size: 0.85rem; }











/* ==========================================
   MASTER CAROUSEL V80 - PREMIUM CENTERED UI
   ========================================== */

/* 1. Contenedor y Carrusel */
.masters-section {
    padding: 15px !important;
    position: relative;
    overflow: hidden;
}

.carousel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    margin-top: 15px;
}

.masters-carousel {
    display: flex;
    gap: 20px;
    width: 100%;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    padding: 20px 5px; /* Padding extra para que las sombras no se corten */
    scrollbar-width: none;
}
.masters-carousel::-webkit-scrollbar { display: none; }

/* 2. Tarjeta Maestra (Master Card) */
.master-card-hz {
    flex: 0 0 360px;
    min-width: 360px;
    background: rgba(17, 25, 40, 0.7) !important;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    border-radius: 28px !important;
    padding: 25px 20px !important;
    scroll-snap-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center; /* Centra todo el contenido internamente */
    text-align: center;
    position: relative;
}

.master-card-hz:hover {
    background: rgba(17, 25, 40, 0.95) !important;
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.15) !important;
}

/* 3. Avatar y Etiqueta de Estado */
.master-avatar-center {
    position: relative;
    width: 90px;
    height: 90px;
    margin: 0 auto 15px auto;
}

.master-avatar-center img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid var(--primary); /* Borde Cian por defecto */
    object-fit: cover;
    background: #000;
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.2);
}

/* Etiqueta flotante REPLICANDO / PAUSADO */
.active-status-tag {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: #00ff88;
    color: #000;
    font-size: 0.65rem;
    font-weight: 900;
    padding: 4px 12px;
    border-radius: 20px;
    z-index: 10;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 10px rgba(0, 255, 136, 0.4);
    white-space: nowrap;
}

.active-status-tag.tag-paused {
    background: #ff3355;
    color: #fff;
    box-shadow: 0 4px 10px rgba(255, 51, 85, 0.4);
}

/* 4. Nombre y Semáforo de Actividad */
.master-title-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 5px;
    width: 100%;
}

.master-name-title {
    font-size: 1.8rem !important; /* Letra grande como en la foto */
    font-weight: 800;
    color: #fff;
    margin: 0;
    letter-spacing: -0.5px;
}

.master-status-inline {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 10px;
    border-radius: 50px;
}

.master-status-inline small {
    color: #a1aab3;
    font-size: 0.75rem;
    font-weight: 600;
}

/* ANIMACIONES DEL SEMÁFORO */
.activity-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.activity-dot.online { background: #00ff88; box-shadow: 0 0 10px #00ff88; animation: pulse-green 2s infinite; }
.activity-dot.warning { background: #ffeb3b; box-shadow: 0 0 10px #ffeb3b; }
.activity-dot.offline { background: #6e7681; }

@keyframes pulse-green {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 255, 136, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(0, 255, 136, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 255, 136, 0); }
}

/* 5. Ganancias de los Copiadores */
.master-copiers-profit {
    font-size: 0.85rem;
    color: #a1aab3;
    margin-bottom: 20px;
    font-weight: 500;
}

.master-copiers-profit span {
    color: #00ff88; /* Verde vibrante */
    font-weight: 900;
    font-size: 1rem;
    letter-spacing: 0.5px;
}

/* 6. Cajas Oscuras de Estadísticas (2x2 Grid) */
.stat-grid-mini {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    width: 100%;
    margin-bottom: 20px;
}

.stat-mini-item {
    background: rgba(0, 0, 0, 0.4); /* Fondo oscuro elegante */
    padding: 14px 15px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.stat-mini-item small { color: #8b949e; font-size: 0.75rem; font-weight: 600; }
.stat-mini-item strong { color: #fff; font-size: 0.95rem; font-weight: 800; }
.stat-mini-item .text-win { color: #00ff88 !important; }

/* 7. Gráfica Oculta (Desplegable) */
.master-details-area {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: all 0.5s ease;
    width: 100%;
}

.master-card-hz.expanded .master-details-area {
    max-height: 250px;
    opacity: 1;
    margin-bottom: 15px;
}

/* 8. Logo del Broker */
.broker-logo-center {
    margin-bottom: 15px;
    margin-top: auto; /* Fuerza al logo a ir hacia abajo */
}

.broker-logo-center img {
    height: 28px;
    width: auto;
    opacity: 0.95;
    filter: drop-shadow(0 2px 5px rgba(0,0,0,0.5));
}

/* 9. Botones de Acción (Replicar / Pausar) */
.btn-neon {
    background: linear-gradient(135deg, #00f2ff, #00d1ff) !important;
    color: #000 !important;
    box-shadow: 0 8px 20px rgba(0, 242, 255, 0.3) !important;
    border: none;
    transition: 0.3s;
}

.btn-active-copy {
    background: linear-gradient(135deg, #00ff88, #00d172) !important;
    color: #000 !important;
    border: none !important;
    box-shadow: 0 8px 20px rgba(0, 255, 136, 0.4) !important;
    cursor: pointer;
    transition: 0.3s;
}

.btn-paused {
    background: linear-gradient(135deg, #ff3355, #ff5f78) !important;
    color: #fff !important;
    border: none !important;
    box-shadow: 0 8px 20px rgba(255, 51, 85, 0.4) !important;
    cursor: pointer;
    transition: 0.3s;
}

/* Hover de los botones */
.btn-neon:hover, .btn-active-copy:hover, .btn-paused:hover {
    transform: translateY(-3px) scale(1.02);
    filter: brightness(1.1);
}

/* Texto inferior (Trader Experto) */
.expert-badge-bottom {
    display: block;
    margin-top: 15px;
    font-size: 0.55rem;
    color: #5c6773;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-weight: 800;
}

/* ==========================================
   ESTADOS DINÁMICOS Y BORDES LATIENDO
   ========================================== */

/* Tarjeta Replicando (Borde Verde) */
.active-master-border {
    border: 2px solid #00ff88 !important;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.15) !important;
    background: rgba(0, 255, 136, 0.02) !important;
}

/* Animación del Borde del Avatar cuando está copiando */
.active-master-border .master-avatar-center img {
    border-color: #00ff88;
    animation: avatar-pulse-green 2.5s infinite;
}

@keyframes avatar-pulse-green {
    0% { box-shadow: 0 0 0 0 rgba(0, 255, 136, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(0, 255, 136, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 255, 136, 0); }
}

/* Tarjeta Pausada (Borde Rojo) */
.active-master-border-paused {
    border: 2px solid #ff3355 !important;
    box-shadow: 0 0 20px rgba(255, 51, 85, 0.15) !important;
    background: rgba(255, 51, 85, 0.02) !important;
}

.active-master-border-paused .master-avatar-center img {
    border-color: #ff3355;
    box-shadow: 0 0 15px rgba(255, 51, 85, 0.3);
}

/* ==========================================
   BOTONES DE NAVEGACIÓN Y MÓVILES
   ========================================== */

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    background: rgba(10, 15, 25, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
}

.carousel-btn:hover {
    background: var(--primary);
    color: #000;
    border-color: var(--primary);
    box-shadow: var(--neon-glow);
}

.carousel-btn.left { left: 0px; }
.carousel-btn.right { right: 0px; }

@media (max-width: 768px) {
    .dashboard-top-section { padding: 0; }
    .masters-carousel { gap: 10px; padding: 10px; }
    
    .master-card-hz {
        flex: 0 0 90% !important; /* En móviles deja ver un pedacito del siguiente */
        min-width: 90% !important;
        padding: 20px 15px !important;
    }

    .carousel-btn { display: none; } /* En móvil se usa el dedo */
    .master-name-title { font-size: 1.5rem !important; }
}
/* ==========================================
   8. BOTONES DE NAVEGACIÓN DEL CARRUSEL
   ========================================== */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    background: rgba(10, 15, 25, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
    box-shadow: 0 5px 15px rgba(0,0,0,0.6);
}

.carousel-btn:hover {
    background: var(--primary);
    color: #000;
    border-color: var(--primary);
    box-shadow: var(--neon-glow);
}

/* En PC las flechas van por fuera */
.carousel-btn.left { left: 0px; }
.carousel-btn.right { right: 0px; }

/* ==========================================
   RESPONSIVE MÓVIL (Carrusel + Flechas)
   ========================================== */
@media (max-width: 768px) {
    .dashboard-top-section { padding: 0; }
    
    /* Damos margen lateral para que las flechas floten sobre el espacio vacío */
    .masters-carousel { 
        gap: 15px; 
        padding: 15px 40px; /* 40px a los lados para que las tarjetas no se monten en los botones */
    }
    
    .master-card-hz {
        flex: 0 0 100% !important; 
        min-width: 100% !important;
        padding: 25px 20px !important;
    }

    /* 🔥 FLECHAS ACTIVAS EN MÓVIL */
    .carousel-btn { 
        display: flex !important; /* Forzamos a que aparezcan */
        width: 35px; /* Ligeramente más pequeñas en móvil */
        height: 35px;
    }
    
    .carousel-btn.left { left: 5px; }
    .carousel-btn.right { right: 5px; }

    .master-name-title { font-size: 1.5rem !important; }
}


















/* ==========================================
   DASHBOARD CONTENT - CENTRAL BLOCK V75
   ========================================== */

/* 1. Contenedor de Expertos Efectivos (Top 3 Personal) */
.personal-performance-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)) !important;
    gap: 15px !important;
    margin-top: 10px !important;
}

.master-mini-card {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 16px !important;
    padding: 12px !important;
    text-align: center !important;
    transition: 0.3s ease !important;
}

.master-mini-card:hover {
    background: rgba(0, 242, 255, 0.05) !important;
    border-color: var(--primary) !important;
    transform: translateY(-3px);
}

.master-mini-card img {
    width: 45px !important;
    height: 45px !important;
    border-radius: 50% !important;
    border: 2px solid var(--primary) !important;
    margin-bottom: 8px !important;
    object-fit: cover;
}

.master-mini-card strong {
    display: block !important;
    font-size: 0.75rem !important;
    color: #fff !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.master-mini-card span {
    font-size: 0.8rem !important;
    color: var(--secondary) !important; /* Verde Neón */
    font-weight: 800 !important;
}

/* 2. Caja del Gráfico de Crecimiento */
.chart-box {
    margin-bottom: 20px !important;
    padding: 20px !important;
}

.chart-header-row {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 20px !important;
}

.chart-header {
    font-size: 0.85rem !important;
    font-weight: 700 !important;
    color: #fff !important;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.chart-filters {
    display: flex !important;
    gap: 5px !important;
    background: rgba(0,0,0,0.2) !important;
    padding: 4px !important;
    border-radius: 10px !important;
}

.btn-filter {
    background: transparent !important;
    border: none !important;
    color: #8b949e !important;
    padding: 5px 12px !important;
    border-radius: 8px !important;
    font-size: 0.7rem !important;
    cursor: pointer;
    transition: 0.3s;
}

.btn-filter.active {
    background: var(--primary) !important;
    color: #000 !important;
    font-weight: 700 !important;
}

/* 3. Bloque de Activos y Estadísticas (Dual Grid) */
.assets-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    margin-top: 10px !important;
}

.asset-row {
    display: flex !important;
    justify-content: space-between !important;
    padding: 10px 15px !important;
    background: rgba(255,255,255,0.02) !important;
    border-radius: 10px !important;
    border: 1px solid rgba(255,255,255,0.05) !important;
}

.asset-name { font-size: 0.8rem !important; font-weight: 700; color: #fff; }
.asset-winrate { font-size: 0.8rem !important; font-weight: 800; color: var(--primary); }

/* 4. Resumen de Resultados (Stats del Sistema) */
.results-summary {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    margin-top: 10px !important;
}

.res-item {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 10px 15px !important;
    background: rgba(0,0,0,0.2) !important;
    border-radius: 10px !important;
}

.res-label { font-size: 0.7rem !important; color: #8b949e; text-transform: uppercase; }
.res-value { font-size: 0.9rem !important; font-weight: 800; }

.text-win { color: #00ff88 !important; }
.text-loss { color: #ff3355 !important; }

/* 5. Botón de Acción Principal (Start Auto-Copy) */
.btn-replica-banner {
    width: 100% !important;
    padding: 18px !important;
    background: linear-gradient(135deg, #00f2ff, #0066ff) !important;
    color: white !important;
    border: none !important;
    border-radius: 18px !important;
    font-weight: 900 !important;
    font-size: 1rem !important;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(0, 242, 255, 0.2);
    transition: 0.3s;
    display: flex !important;
    justify-content: center;
    align-items: center;
    gap: 12px;
}

.btn-replica-banner:hover {
    transform: scale(1.02);
    box-shadow: 0 15px 35px rgba(0, 242, 255, 0.3);
    filter: brightness(1.1);
}

/* ==========================================
   RESPONSIVE MÓVIL Y TABLETS
   ========================================== */

@media (max-width: 992px) {
    /* En tablets bajamos a una sola columna para los grids inferiores */
    div[style*="grid-template-columns: 1fr 1.5fr"] {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
}

@media (max-width: 768px) {
    .chart-box {
        padding: 15px !important;
    }
    
    .canvas-wrapper {
        height: 180px !important; /* Más bajo en celular para ahorrar espacio */
    }

    .personal-performance-grid {
        grid-template-columns: repeat(3, 1fr) !important; /* 3 mini cards en línea */
        gap: 8px !important;
    }

    .master-mini-card {
        padding: 8px 5px !important;
    }

    .master-mini-card img {
        width: 35px !important;
        height: 35px !important;
    }
    
    .btn-replica-banner {
        padding: 15px !important;
        font-size: 0.9rem !important;
    }
}

/* TV y PC Ultra-Wide */
@media (min-width: 1800px) {
    .personal-performance-grid {
        grid-template-columns: repeat(6, 1fr) !important;
    }
}














/* ==========================================
   BLOQUE DE BALANCES: DISEÑO LÍQUIDO (PC/TABLET/MÓVIL)
   Garantiza que nada se solape
   ========================================== */

/* 1. Contenedor Flexible: Se adapta solo al ancho disponible */
.balance-grid { 
    display: flex !important;
    flex-wrap: wrap !important; /* Permite que bajen si no caben */
    gap: 15px !important; 
    margin-bottom: 25px !important;
    width: 100% !important;
    position: relative !important;
}

/* 2. Tarjetas de Saldo: Crecen proporcionalmente */
.stat-card { 
    flex: 1 1 calc(50% - 15px) !important; /* En PC/Tablet ocupan mitad y mitad */
    min-width: 200px !important; /* Evita que se compriman demasiado */
    padding: 20px !important; 
    background: rgba(17, 25, 40, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 20px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    height: auto !important; /* IMPORTANTE: Altura automática para no pisar otros bloques */
    transition: transform 0.3s ease !important;
}

/* Efectos Exnova */
.stat-card.real { border-bottom: 3px solid #00ff88 !important; }
.stat-card.real h2, .stat-card.real i { color: #00ff88 !important; }

.stat-card.demo { border-bottom: 3px solid #ff9800 !important; }
.stat-card.demo h2, .stat-card.demo i { color: #ff9800 !important; }

/* Texto de los saldos */
.stat-card h2 { 
    font-size: clamp(1.1rem, 2vw, 1.5rem) !important; /* Tamaño de fuente fluido */
    margin: 10px 0 0 0 !important; 
    font-weight: 800 !important; 
    white-space: nowrap !important;
}

.card-header { 
    display: flex !important;
    align-items: center !important;
    gap: 8px !important; 
    font-size: 0.7rem !important; 
    color: #8b949e !important; 
    text-transform: uppercase; 
    font-weight: 700 !important; 
}

/* ==========================================
   ADAPTACIÓN RESPONSIVA (TABLET Y MÓVIL)
   ========================================== */

/* Tablets (Hasta 992px) */
@media (max-width: 992px) {
    .stat-card {
        padding: 15px !important;
    }
}

/* Móviles (Hasta 768px) */
@media (max-width: 768px) {
    .balance-grid {
        gap: 10px !important;
    }
    
    .stat-card {
        flex: 1 1 100% !important; /* En móviles ocupan todo el ancho (uno bajo el otro) */
        min-width: 100% !important;
    }

    .stat-card h2 {
        font-size: 1.4rem !important;
    }
}

/* Ajustes de Nav para evitar colisiones arriba */
@media (max-width: 480px) {
    .nav-bar { 
        padding: 10px !important;
        flex-direction: row !important;
        justify-content: space-between !important;
    }
    .nav-user-info, .nav-greeting { display: none !important; } /* Ahorro de espacio */
}









/* ==========================================
   GESTOR DE RIESGO - ULTRA RESPONSIVE V80
   ========================================== */

.risk-section {
    padding: 20px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 20px !important;
}

/* Título del Panel */
.risk-section .panel-title {
    font-size: 0.9rem !important;
    color: #fff !important;
    margin-bottom: 5px !important;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Contenedor de Inputs */
.risk-inputs {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important; /* 2 columnas en PC/Tablet */
    gap: 15px !important;
}

/* Divisores de Sección */
.section-divider {
    grid-column: span 2 !important; /* Ocupa todo el ancho */
    font-size: 0.65rem !important;
    font-weight: 800 !important;
    color: var(--primary) !important;
    letter-spacing: 1.5px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    padding-bottom: 5px !important;
    margin-top: 10px !important;
    text-transform: uppercase !important;
}

/* Campos de Entrada Individuales */
.input-field {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
}

/* Forzar que ciertos campos ocupen todo el ancho (Selects) */
.input-field.full-row {
    grid-column: span 2 !important;
}

/* Estilo de Etiquetas (Labels) */
.input-field label {
    font-size: 0.7rem !important;
    color: #8b949e !important;
    font-weight: 600 !important;
    padding-left: 2px !important;
}

/* Estilo de Inputs y Selects (Estilo Glass Oscuro) */
.risk-section input, 
.risk-section select {
    width: 100% !important;
    background: rgba(0, 0, 0, 0.3) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 12px !important;
    padding: 12px 15px !important;
    color: #fff !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    outline: none !important;
    transition: all 0.3s ease !important;
    height: 48px !important; /* Altura optimizada para móviles */
}

/* Efecto Focus */
.risk-section input:focus, 
.risk-section select:focus {
    border-color: var(--primary) !important;
    background: rgba(0, 0, 0, 0.5) !important;
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.1) !important;
}

/* Botón de Guardar */
.risk-section .btn-neon {
    width: 100% !important;
    margin-top: 10px !important;
    height: 50px !important;
    font-size: 0.9rem !important;
    font-weight: 900 !important;
    letter-spacing: 1px !important;
    border-radius: 14px !important;
}

/* ==========================================
   ADAPTACIÓN PARA MÓVILES (Celulares)
   ========================================== */

@media (max-width: 768px) {
    .risk-inputs {
        grid-template-columns: 1fr !important; /* 1 sola columna en móviles */
        gap: 12px !important;
    }

    .section-divider, 
    .input-field.full-row {
        grid-column: span 1 !important;
    }

    .risk-section {
        padding: 15px !important;
    }

    .risk-section input, 
    .risk-section select {
        font-size: 1rem !important; /* Evita el zoom automático en iOS */
        height: 52px !important;    /* Un poco más grande para el pulgar */
    }

    .input-field label {
        font-size: 0.75rem !important;
    }
}

/* Especial para Tablets (Vertical) */
@media (min-width: 769px) and (max-width: 1024px) {
    .risk-inputs {
        gap: 10px !important;
    }
}











/* ==========================================
   HEADER NAV BAR - RESTAURACIÓN ORIGINAL
   ========================================== */

.nav-bar {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 12px 20px !important;
    margin-bottom: 20px !important;
    width: 100% !important;
    border-radius: 0 0 20px 20px !important; /* Estilo ceñido arriba */
    position: relative !important;
    z-index: 1000 !important;
}

/* Contenedor del Logo (Izquierda) */
.nav-brand-container {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
}

.nav-logo-small {
    height: 40px !important;
    width: auto !important;
}

.brand-text-wrapper {
    display: flex !important;
    flex-direction: column !important;
    line-height: 1 !important;
}

.brand-main-title {
    font-size: 1.1rem !important;
    font-weight: 800 !important;
}

.brand-auto { color: #fff !important; }
.brand-copy { color: var(--primary) !important; }
.brand-enterprise {
    font-size: 0.6rem !important;
    color: #8b949e !important;
    letter-spacing: 2px !important;
    text-transform: uppercase !important;
    font-weight: 700 !important;
}

/* Lado Derecho (Perfil + Bot Status) */
.nav-right-side {
    display: flex !important;
    align-items: center !important;
    gap: 20px !important;
}

/* Perfil de Usuario */
.user-profile-nav {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    cursor: pointer !important;
    padding: 5px 10px !important;
    border-radius: 12px !important;
    transition: background 0.3s !important;
}

.user-profile-nav:hover {
    background: rgba(255, 255, 255, 0.05) !important;
}

.nav-avatar {
    width: 35px !important;
    height: 35px !important;
    border-radius: 50% !important;
    border: 2px solid var(--primary) !important;
    object-fit: cover !important;
}

.nav-user-info {
    display: flex !important;
    flex-direction: column !important;
    text-align: left !important;
    line-height: 1.2 !important;
}

.nav-greeting {
    font-size: 0.65rem !important;
    color: #8b949e !important;
}

#nav-user-name {
    font-size: 0.85rem !important;
    color: #fff !important;
    font-weight: 700 !important;
}

/* Bot Status Badge */
.status-wrapper {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    background: rgba(0, 0, 0, 0.2) !important;
    padding: 6px 12px !important;
    border-radius: 50px !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
}

#bot-status-text {
    font-size: 0.65rem !important;
    font-weight: 900 !important;
    letter-spacing: 1px !important;
}

/* Animación Logo (Si la usabas) */
.main-logo-anim {
    filter: drop-shadow(0 0 5px rgba(0, 242, 255, 0.3));
}

/* ==========================================
   RESPONSIVE HEADER
   ========================================== */

@media (max-width: 768px) {
    .nav-bar {
        padding: 10px 15px !important;
    }
    
    .brand-text-wrapper {
        display: none !important; /* Oculta texto en móvil para dar espacio */
    }

    .nav-greeting {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .nav-right-side {
        gap: 10px !important;
    }
    
    .user-profile-nav {
        padding: 0 !important;
    }
    
    #nav-user-name {
        font-size: 0.75rem !important;
    }

    .status-wrapper {
        padding: 4px 8px !important;
    }
}
















/* ==========================================
   MODAL DE ALERTA SSID - PREMIUM DESIGN
   ========================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

.alert-content {
    max-width: 450px;
    width: 100%;
    padding: 30px !important;
    text-align: center;
    border: 1px solid rgba(255, 51, 85, 0.3) !important; /* Borde rojizo de advertencia */
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    animation: alert-pop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes alert-pop {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.alert-icon {
    font-size: 3.5rem;
    margin-bottom: 20px;
    display: block;
    filter: drop-shadow(0 0 10px rgba(255, 152, 0, 0.5));
}

.alert-reasons {
    list-style: none;
    padding: 0;
    margin: 20px 0;
    text-align: left;
}

.alert-reasons li {
    background: rgba(255, 255, 255, 0.05);
    margin-bottom: 8px;
    padding: 10px 15px;
    border-radius: 10px;
    font-size: 0.85rem;
    color: #ccc;
    border-left: 3px solid var(--error);
}

.btn-update-ssid {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #ff3355, #ff6b81) !important;
    color: #fff !important;
    border: none;
    border-radius: 12px;
    font-weight: 900;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(255, 51, 85, 0.3);
    transition: 0.3s;
    text-transform: uppercase;
}

.btn-update-ssid:hover {
    transform: translateY(-3px);
    filter: brightness(1.2);
    box-shadow: 0 15px 30px rgba(255, 51, 85, 0.5);
}

















/* ==========================================
   PERFIL / SSID: UI PREMIUM MULTIPLATAFORMA
   Aislamiento total de clases para 0 conflictos
   ========================================== */

/* 1. Contenedor Maestro: Centrado absoluto y fondo radial dinámico */
.profile-page-wrapper {
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, #1c2128 0%, #0b0e11 100%) !important;
    padding: 20px;
    box-sizing: border-box;
    overflow-x: hidden;
}

/* 2. Tarjeta Principal: Glassmorfismo V8.0 */
.profile-setup-card {
    width: 100%;
    max-width: 440px;
    background: rgba(22, 27, 34, 0.8) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 32px !important;
    padding: 45px 35px !important;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
    animation: profileFadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes profileFadeIn {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 3. Avatar: Previsualización con halo de neón */
.avatar-edit-container {
    position: relative;
    width: 135px;
    height: 135px;
    margin: 0 auto 35px;
}

.avatar-edit-preview {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 4px solid var(--primary);
    padding: 4px;
    object-fit: cover;
    background: #0b0e11;
    box-shadow: 0 0 30px rgba(0, 242, 255, 0.2);
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.avatar-edit-label {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background: var(--primary);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    cursor: pointer;
    border: 4px solid #161b22;
    font-size: 1.1rem;
    transition: 0.3s;
    box-shadow: 0 5px 15px rgba(0,0,0,0.4);
}

.avatar-edit-label:hover {
    transform: scale(1.15) rotate(15deg);
    background: #fff;
}

/* 4. Estilo de Inputs (Inspiración Fintech) */
.profile-input-group {
    text-align: left;
    margin-bottom: 24px;
}

.profile-input-group label {
    display: block;
    font-size: 0.7rem;
    color: #8b949e;
    text-transform: uppercase;
    font-weight: 800;
    margin-bottom: 10px;
    letter-spacing: 1.5px;
    padding-left: 5px;
}

.profile-input-group input {
    width: 100%;
    background: rgba(0, 0, 0, 0.35) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 16px !important;
    padding: 16px 20px !important;
    color: #fff !important;
    font-size: 1rem !important;
    font-weight: 500 !important;
    outline: none !important;
    box-sizing: border-box;
    transition: 0.3s all ease;
}

.profile-input-group input:focus {
    border-color: var(--primary) !important;
    background: rgba(0, 0, 0, 0.5) !important;
    box-shadow: 0 0 0 4px rgba(0, 242, 255, 0.1) !important;
}

/* 5. Botones de Acción */
.profile-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 40px;
}

.btn-neon-profile {
    background: var(--primary) !important;
    color: #000 !important;
    border: none !important;
    border-radius: 16px !important;
    height: 58px !important;
    font-size: 0.95rem !important;
    font-weight: 800 !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
}

.btn-neon-profile:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 242, 255, 0.4);
    filter: brightness(1.1);
}

.btn-exit-profile {
    background: rgba(255, 255, 255, 0.05) !important;
    color: #8b949e !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 16px !important;
    height: 54px !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    cursor: pointer;
    transition: 0.3s;
    width: 100%;
}

.btn-exit-profile:hover {
    background: rgba(255, 51, 85, 0.12) !important;
    color: #ff3355 !important;
    border-color: #ff3355 !important;
}

/* 6. Controles de Idioma e Interfaz */
.lang-fixed-nav {
    position: fixed;
    top: 25px;
    right: 25px;
    display: flex;
    gap: 8px;
    z-index: 1000;
}

.mini-filter-btn {
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 800;
    transition: 0.2s;
}

.mini-filter-btn:hover {
    background: var(--primary);
    color: #000;
    border-color: var(--primary);
}

/* ==========================================
   ADAPTACIONES RESPONSIVAS
   ========================================== */

/* TV y Pantallas 4K */
@media (min-width: 1920px) {
    .profile-setup-card {
        max-width: 500px;
        transform: scale(1.15); /* Escala suave para TV */
    }
}

/* Tablets */
@media (max-width: 992px) {
    .profile-setup-card {
        max-width: 400px;
    }
}

/* Móviles */
@media (max-width: 480px) {
    .profile-page-wrapper {
        align-items: flex-start; 
        padding: 15px;
    }
    .profile-setup-card {
        border: none !important;
        background: transparent !important;
        box-shadow: none !important;
        padding: 30px 10px !important;
        backdrop-filter: none;
    }
    .profile-input-group input {
        font-size: 16px !important; /* Estándar iOS para evitar zoom */
        height: 54px;
    }
    .lang-fixed-nav {
        top: auto;
        bottom: 20px;
        right: 50%;
        transform: translateX(50%); /* Centrado abajo en móvil */
    }
}










/* ==========================================
   BOTÓN GLOBAL: REPLICAR / DETENER
   ========================================== */

/* 1. ESTADO BASE: AZUL (Replicar en Automático) */
.btn-replica-banner {
    width: 100% !important;
    padding: 18px !important;
    background: linear-gradient(135deg, #00c6ff, #0072ff) !important; /* Azul Brillante Premium */
    color: #ffffff !important;
    border: none !important;
    border-radius: 16px !important;
    font-weight: 900 !important;
    font-size: 1.05rem !important;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(0, 114, 255, 0.3) !important; /* Sombra Azul */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: flex !important;
    justify-content: center;
    align-items: center;
    gap: 12px;
    letter-spacing: 1px;
}

.btn-replica-banner:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(0, 114, 255, 0.5) !important;
    filter: brightness(1.1);
}

/* 2. ESTADO ACTIVO: ROJO (Detener Réplica) */
.btn-replica-banner.active-btn {
    background: linear-gradient(135deg, #ff3355, #ff0033) !important; /* Rojo Intenso */
    color: #ffffff !important;
    box-shadow: 0 10px 25px rgba(255, 51, 85, 0.3) !important; /* Sombra Roja */
}

.btn-replica-banner.active-btn:hover {
    box-shadow: 0 15px 35px rgba(255, 51, 85, 0.5) !important;
}

/* Adaptación para móviles (Botón un poco más compacto) */
@media (max-width: 768px) {
    .btn-replica-banner {
        padding: 16px !important;
        font-size: 0.95rem !important;
    }
}






/* Animación Amarilla para el estado ESPERANDO */
.activity-dot.warning { 
    background: #ffeb3b; 
    box-shadow: 0 0 10px #ffeb3b; 
    animation: pulse-yellow 2s infinite; 
}

@keyframes pulse-yellow {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 235, 59, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(255, 235, 59, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 235, 59, 0); }
}
/* Añadir al style.css */

/* Resplandor Verde cuando está REPLICANDO */
.active-master-border {
    border: 2px solid #00ff88 !important;
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.2), inset 0 0 15px rgba(0, 255, 136, 0.1) !important;
    animation: glow-green 3s infinite alternate;
}

/* Resplandor Rojo cuando está PAUSADO */
.active-master-border-paused {
    border: 2px solid #ff3355 !important;
    box-shadow: 0 0 30px rgba(255, 51, 85, 0.2), inset 0 0 15px rgba(255, 51, 85, 0.1) !important;
}

@keyframes glow-green {
    from { box-shadow: 0 0 20px rgba(0, 255, 136, 0.2); }
    to { box-shadow: 0 0 40px rgba(0, 255, 136, 0.4); }
}