:root {
    --bg-color: #ffffff;          /* Fondo general blanco y limpio */
    --card-bg: #fdfdfd;           /* Tarjetas de productos ligeramente resaltadas */
    --primary: #d80d8b;           /* Magenta característico de NEXA */
    --accent-gold: #d4af37;       /* Dorado reservado para módulos activos e incentivos */
    --text-main: #222222;         /* Texto principal oscuro para máxima legibilidad */
    --text-sec: #666666;          /* Texto secundario (descripciones) */
    --danger: #ff4b4b;
    --success: #25D366; 
    --nav-height: 70px;
    --border-color: #eaeaea;      /* Bordes sutiles para separar secciones */
}

* { box-sizing: border-box; tap-highlight-color: transparent; }

body {
    background-color: var(--bg-color);
    color: var(--text-main);
}

.hidden { display: none !important; }
.container { padding: 20px 20px 80px 20px; max-width: 500px; margin: 0 auto; }

.search-bar { 
    background: #2c2c2c; border: 1px solid #333; color: white; padding: 12px 15px; 
    border-radius: 10px; width: 100%; margin-bottom: 20px; font-size: 14px;
}

.vip-card-digital { 
    background: linear-gradient(135deg, #FFD700, #B8860B);
    border-radius: 20px; padding: 25px; height: 220px; display: flex; flex-direction: column; 
    justify-content: space-between; box-shadow: 0 10px 30px rgba(255, 215, 0, 0.15);
    color: black; margin-bottom: 20px;
}
.card-row { display: flex; justify-content: space-between; align-items: center; }
.card-label { font-size: 16px; font-weight: 800; opacity: 0.7; }
.card-value { font-size: 18px; font-weight: 900; text-transform: uppercase; }
.card-small { font-size: 16px; font-weight: 600; }
.counter-box { text-align: right; }
.counter-days { font-size: 36px; font-weight: 900; line-height: 1; }
.counter-text { font-size: 10px; font-weight: bold; text-transform: uppercase; }

.btn-primary { 
    background: var(--primary); color: black; border: none; padding: 12px; 
    width: 100%; border-radius: 10px; font-weight: bold; font-size: 16px; 
    margin-top: 10px; cursor: pointer;
}
.btn-outline { 
    background: transparent; border: 1px solid var(--primary); color: var(--primary); padding: 10px;
    width: 100%; border-radius: 10px; font-weight: bold; cursor: pointer; margin-top:10px;
}
input.login-input { 
    width: 100%; padding: 15px; background: #2c2c2c; border: 1px solid #444; 
    border-radius: 10px; color: white; text-align: center; font-weight: bold;
}

.wallet-card { 
    background: linear-gradient(180deg, #1e1e1e, #121212); border: 1px solid #333; 
    border-radius: 20px; padding: 25px; text-align: center; margin-bottom: 20px;
}
.wallet-balance-label { font-size: 12px; color: #888; font-weight: 800; }
.wallet-balance { font-size: 45px; font-weight: 900; color: var(--primary); margin: 5px 0; }
.referral-code-box { 
    background: rgba(255,215,0,0.1); border: 1px dashed var(--primary); padding: 15px; 
    border-radius: 12px; margin-top: 20px; display: flex; justify-content: space-between; align-items: center;
}
.code-label { font-size: 12px; color: #aaa;}
.code-value { font-size: 18px; font-weight: 800; color: white;}

.btn-withdraw { 
    background: transparent; border: 1px solid #555; color: #555;
    padding: 15px; width: 100%; border-radius: 12px; font-size: 15px; font-weight: 700; margin-top: 10px;
}
.btn-withdraw.active { background: var(--primary); color: black; border: none; }

.jackpot-container { 
    background: radial-gradient(circle, #2a2a2a 0%, #111 100%); border: 2px solid var(--primary); 
    border-radius: 20px; padding: 20px 15px; text-align: center; margin-bottom: 25px;
}
.jackpot-label { font-size: 12px; color: #aaa; }
.jackpot-number { font-size: 45px; font-weight: 900; color: var(--primary); margin: 0; }
.ranking-list { background: #1e1e1e; border-radius: 15px; padding: 0 15px; border: 1px solid #333; }
.ranking-item { display: flex; align-items: center; justify-content: space-between; padding: 15px 0; border-bottom: 1px solid #333; }
.rank-pos { width: 30px; font-weight: bold; font-size: 16px; color: #777; text-align: center;}
.rank-info { flex: 1; margin-left: 10px; }
.rank-name { font-weight: bold; font-size: 14px; color: white; display: block;}
.rank-refs { font-size: 11px; color: #888; }

.bottom-nav { 
    position: fixed; bottom: 0; left: 0; right: 0; height: var(--nav-height); background: #1a1a1a; 
    border-top: 1px solid #333; display: flex; justify-content: flex-start; align-items: center;
    z-index: 1000; overflow-x: auto; scrollbar-width: none; gap: 4px; padding: 0 10px;
}
.nav-item { 
    display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--text-sec);
    font-size: 12px; cursor: pointer; flex: 1; height: 100%; min-width: 60px; flex-shrink: 0;
} 
.nav-item.active { color: var(--primary); }
.nav-icon { font-size: 20px; margin-bottom: 3px; }

/* Grid Styles for Directory & Allies */
.dir-services-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 6px; }
.dir-service-item { 
    background-color: #151923; border-radius: 14px; display: flex; flex-direction: column; 
    padding: 11px; border: 1px solid rgba(255, 255, 255, 0.08); 
}
.dir-service-item img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 14px; margin-bottom: 2px; }
.dir-service-item span { font-size: 0.85rem; font-weight: 600; text-align: center; display: block; color: white;}

/* =========================================
   MÓDULO 13: ADMINISTRADOR Y FORMULARIOS
   ========================================= */

/* Botón punteado para registrar negocio */
.btn-dashed {
    background: transparent; 
    border: 2px dashed var(--primary); 
    color: var(--primary);
    padding: 15px; 
    width: 100%; 
    border-radius: 12px; 
    font-weight: bold; 
    cursor: pointer;
    margin-bottom: 20px; 
    transition: all 0.3s; 
    font-size: 14px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}
.btn-dashed:hover { 
    background: rgba(255, 215, 0, 0.1); 
    transform: translateY(-2px);
}

/* Panel del Administrador */
.admin-panel-box {
    background: #1e1e1e; 
    border: 1px solid #333; 
    border-radius: 15px; 
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}
.admin-result-box {
    margin-top: 15px; 
    background: #2c2c2c; 
    padding: 15px; 
    border-radius: 10px; 
    border: 1px solid #444;
    display: none;
}

/* Tarjetas de Solicitudes Pendientes (Admin) */
.admin-biz-card {
    background: #2c2c2c; 
    padding: 18px; 
    border-radius: 12px; 
    margin-bottom: 15px; 
    border: 1px solid #444;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2); 
    transition: transform 0.2s;
}
.admin-biz-card:hover { 
    border-color: var(--primary); 
}
.admin-biz-badge {
    padding: 4px 10px; 
    border-radius: 6px; 
    font-size: 10px; 
    font-weight: 900; 
    text-transform: uppercase; 
    letter-spacing: 0.5px; 
    display: inline-block; 
    margin-bottom: 10px;
}
.admin-biz-badge.ally { background: var(--primary); color: black; }
.admin-biz-badge.dir { background: #3B82F6; color: white; }
.admin-biz-quote {
    color: #ddd; 
    font-size: 13px; 
    margin: 12px 0; 
    background: #1a1a1a; 
    padding: 12px; 
    border-radius: 8px; 
    border-left: 3px solid var(--primary); 
    font-style: italic;
    line-height: 1.4;
}

/* Formularios Oscuros (Modal de Registro) */
.dark-modal-content { 
    background: #1e1e1e !important; 
    border: 1px solid #333 !important; 
}
.dark-input {
    width: 100%; 
    padding: 14px 15px; 
    border: 1px solid #444; 
    background: #2c2c2c; 
    border-radius: 10px; 
    font-size: 14px; 
    color: white; 
    margin-bottom: 15px; 
    outline: none;
    transition: border-color 0.3s;
    font-family: inherit;
}
.dark-input:focus { 
    border-color: var(--primary); 
}
.dark-input::placeholder { 
    color: #888; 
}
select.dark-input { 
    appearance: none; 
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23ffffff%22%20d%3D%22M287%2069.4L146.2%20205.9%205.4%2069.4c-1.8-1.8-4.7-1.8-6.5%200l-5.4%205.4c-1.8%201.8-1.8%204.7%200%206.5l142.7%20142.7c1.8%201.8%204.7%201.8%206.5%200l142.7-142.7c1.8-1.8%201.8-4.7%200-6.5l-5.4-5.4c-1.8-1.8-4.7-1.8-6.5%200z%22%2F%3E%3C%2Fsvg%3E"); 
    background-repeat: no-repeat; 
    background-position: right 15px center; 
    background-size: 10px; 
    cursor: pointer;
}

/* =========================================
   MÓDULO: NEGOCIO (BILLETERA Y RED MLM)
   ========================================= */

/* Tarjeta Principal de la Billetera */
.wallet-card {
    background: linear-gradient(145deg, #1e1e1e, #111);
    border: 1px solid #333;
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    margin-bottom: 25px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

.wallet-balance-label {
    color: #aaa;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.wallet-balance {
    color: var(--primary);
    font-size: 38px;
    font-weight: 900;
    margin-bottom: 20px;
    text-shadow: 0 2px 10px rgba(255, 215, 0, 0.15);
}

/* Caja del Código de Referido */
.referral-code-box {
    background: rgba(0, 0, 0, 0.5);
    border: 1px dashed var(--primary);
    border-radius: 10px;
    padding: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.code-label {
    color: #888;
    font-size: 12px;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.code-value {
    color: white;
    font-size: 22px;
    font-weight: bold;
    letter-spacing: 3px;
    font-family: monospace;
}

/* Árbol Genealógico (Red de Niveles) */
.genealogy-tree {
    background: #1e1e1e;
    border: 1px solid #333;
    border-radius: 15px;
    padding: 20px;
}

.genealogy-level {
    margin-bottom: 15px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #444;
}

.genealogy-level:last-child {
    margin-bottom: 0;
}

.level-header {
    background: #2c2c2c;
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 14px;
    color: white;
    border-bottom: 1px solid #444;
}

.badge {
    background: var(--primary);
    color: black;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 800;
}

/* Diferenciar colores de los niveles en los badges (Opcional pero visualmente útil) */
#badge-l1 { background: var(--primary); color: black; }
#badge-l2 { background: var(--success, #25D366); color: black; }
#badge-l3 { background: #4287FC; color: white; }

.level-list {
    background: #151515;
    padding: 10px 15px;
    min-height: 10px;
}

/* Estilo para cada usuario dentro de la lista (inyectado desde JS) */
.level-list div {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
