/* ============================================================
   1. VARIABLES Y CONFIGURACIÓN BASE
   ============================================================ */
:root {
    --primary: #ffb347;          /* Naranja principal */
    --bg-dark: #0f0f0f;          /* Fondo profundo */
    --card-bg: #1a1a1a;          /* Fondo de tarjetas */
    --text-white: #ffffff;
    --text-dim: #b0b0b0;         /* Gris para textos secundarios */
    --border: rgba(255, 255, 255, 0.1);
    --success: #81c784;          /* Verde éxito */
    --warning: #ff8a65;          /* Naranja/Rojo deuda */
    --info-blue: #4fc3f7;        /* Azul para Saldo Disponible */
    --header-table: #81d4fa;     /* Azul claro encabezados */
}

body {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-white);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
}

/* ============================================================
   2. CONTENEDOR DE LA CALCULADORA
   ============================================================ */
.container {
    background: var(--card-bg);
    width: 95%;
    max-width: 480px;
    padding: 25px;
    border-radius: 20px;
    border: 1px solid var(--border);
    box-shadow: 0 20px 50px rgba(0,0,0,0.8);
    margin-bottom: 40px;
}

h1 {
    text-align: center;
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 25px;
    background: linear-gradient(to right, #ffffff, var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Etiquetas de los campos */
p {
    font-size: 12px;
    color: var(--text-dim);
    margin: 0 0 5px 2px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Estilo del Saldo Disponible en Azul */
#saldoEnBsReal {
    color: var(--info-blue) !important;
    font-weight: 800;
    font-size: 14px;
    margin-bottom: 15px;
    display: block;
}

input[type="number"], select {
    width: 100%;
    padding: 14px;
    background: #000;
    border: 1px solid var(--border);
    border-radius: 12px;
    color: white;
    font-size: 16px;
    margin-bottom: 18px;
    box-sizing: border-box;
}

.checkbox-group {
    background: rgba(255,255,255,0.03);
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 1px solid var(--border);
}

.checkbox-item {
    display: flex;
    align-items: center;
    margin: 10px 0;
    cursor: pointer;
    font-size: 14px;
}

.checkbox-item input {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    accent-color: var(--primary);
}

/* ============================================================
   3. CAJA DE RESULTADOS (COSTOS GRANDES)
   ============================================================ */
.total-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0,0,0,0.5);
    padding: 20px;
    border-radius: 15px;
    border-left: 5px solid var(--primary);
    margin-top: 10px;
}

.total-label {
    display: flex;
    flex-direction: column;
}

.total-label span {
    font-size: 12px;
    color: var(--text-dim);
    font-weight: bold;
}

/* Números de costo más grandes */
.total-box h2 {
    margin: 0;
    font-size: 28px; /* Tamaño aumentado */
    font-weight: 800;
}

#mostrarTotal { color: var(--success); }
#mostrarBs { color: var(--primary); }

/* ============================================================
   4. MENSAJE DE RECARGA Y SPEECH
   ============================================================ */
#mensajeSaldo {
    text-align: center;
    margin-top: 15px;
    font-weight: 900;
    font-size: 16px;
    text-transform: uppercase;
    background: rgba(0,0,0,0.3);
    padding: 12px;
    border-radius: 10px;
}

#resumenTexto {
    margin-top: 25px;
    padding: 20px;
    background: rgba(255,255,255,0.04);
    border-radius: 15px;
    border: 1px solid var(--border);
    font-size: 15px;
    line-height: 1.6;
    color: #f0f0f0;
    display: none;
}

#resumenTexto b {
    color: var(--primary);
    font-weight: 800;
}

/* ============================================================
   5. BOTONES DE CONTROL (TABS Y MONEDA)
   ============================================================ */
.controles-vista {
    width: 100%;
    max-width: 1000px;
    text-align: center;
    margin-bottom: 30px;
}

.selector-moneda, .tabs-simpleplus {
    display: inline-flex;
    background: #1a1a1a;
    padding: 5px;
    border-radius: 50px;
    border: 1px solid var(--border);
    margin: 10px;
}

.moneda-btn, .tab-btn {
    padding: 12px 25px;
    border: none;
    background: transparent;
    color: var(--text-dim);
    font-weight: 800;
    cursor: pointer;
    border-radius: 50px;
    transition: 0.3s;
    font-size: 12px;
    text-transform: uppercase;
}

.moneda-btn.active, .tab-btn.active {
    background: var(--primary);
    color: #000;
}

/* ============================================================
   6. TABLAS DE PRECIOS (NÚMEROS EN BLANCO)
   ============================================================ */
.seccion-tarifas {
    width: 100%;
    max-width: 1150px;
}

.titulo-grupo {
    text-align: center;
    color: var(--primary);
    font-size: 1.2rem;
    margin: 40px 0 20px;
    text-transform: uppercase;
    font-weight: 900;
    letter-spacing: 2px;
}

.grid-tarifas {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 25px;
    margin-bottom: 50px;
}

.card-tarifa {
    background: var(--card-bg);
    border-radius: 18px;
    border: 1px solid var(--border);
    overflow: hidden;
}

.card-tarifa h3 {
    background: rgba(255,255,255,0.05);
    margin: 0;
    padding: 15px;
    text-align: center;
    font-size: 12px;
    color: var(--header-table);
    border-bottom: 1px solid var(--border);
}

.matriz-precios {
    display: grid;
    grid-template-columns: 85px 1fr 1fr 1fr;
    text-align: center;
}

.m-header {
    background: rgba(0,0,0,0.6);
    color: var(--header-table);
    padding: 12px 5px;
    font-size: 11px;
    font-weight: 900;
    border-bottom: 1px solid var(--border);
}

/* Mbps en Blanco Brillante */
.m-cell-plan {
    padding: 15px 5px;
    font-weight: 900;
    background: rgba(255,255,255,0.03);
    border-bottom: 1px solid var(--border);
    border-right: 1px solid var(--border);
    color: #ffffff;
}

/* Precios en Blanco Puro y un poco más grandes */
.m-cell-precio {
    padding: 15px 5px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    font-size: 14px;
    color: #ffffff !important; /* Blanco solicitado */
    font-weight: 700;
    transition: 0.2s;
}

.m-cell-precio:hover {
    background: var(--primary);
    color: #000 !important;
    font-weight: 900;
}

/* ============================================================
   7. RESPONSIVE
   ============================================================ */
@media (max-width: 600px) {
    .grid-tarifas { grid-template-columns: 1fr; }
    .matriz-precios { grid-template-columns: 70px 1fr 1fr 1fr; }
    .total-box h2 { font-size: 24px; }
    .container { padding: 15px; }
}