/* ================= GLOBAL (ESTÉTICA ORIGINAL) ================= */
body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #f4f6f8;
    margin: 0;
    color: #333;
}

.hidden { display: none !important; }

/* ================= TOP BAR ================= */
.topBar {
    background: #007a5a;
    color: white;
    padding: 12px;
    font-size: 20px;
    font-weight: bold;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo { height: 32px; width: auto; }

/* ================= CARDS ================= */
.card {
    max-width: 400px;
    margin: 60px auto;
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.card-wide {
    max-width: 1200px;
    margin: 20px auto;
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

/* ================= INPUTS Y SELECT ================= */
input, .select-moderno {
    width: 100%;
    padding: 14px 18px;
    margin-bottom: 15px;
    border-radius: 12px;
    border: 2px solid #eee;
    font-size: 16px;
    background-color: #f9f9f9;
    transition: all 0.3s ease;
    box-sizing: border-box;
    outline: none;
}

/* ================= BANNER SALDO (TU ESTÉTICA CON BOTONES NUEVOS) ================= */
.saldo-banner {
    background: #007a5a;
    color: white;
    padding: 20px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.btn-logout {
    background: #e74c3c !important; /* Rojo para salir */
    width: auto !important;
    padding: 8px 15px !important;
    font-size: 13px;
    color: white;
    border-radius: 8px;
    border: none;
    cursor: pointer;
}

/* Estilo para los botones nuevos de Movimientos y Clave dentro del banner */
.saldo-banner button:not(.btn-logout) {
    background: rgba(255,255,255,0.2);
    width: auto;
    padding: 8px 15px;
    font-size: 13px;
    margin-right: 5px;
    border: none;
    color: white;
    border-radius: 8px;
    cursor: pointer;
}

/* ================= LAYOUT ================= */
.main-layout { display: flex; gap: 25px; align-items: flex-start; }
.col-main { flex: 2; }
.col-side { flex: 1; min-width: 280px; position: sticky; top: 80px; }

/* ================= TIENDA Y TARJETAS ================= */
.tienda-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
}

.tarjeta {
    background: white;
    border: 1px solid #eee;
    padding: 12px;
    border-radius: 10px;
    text-align: center;
    transition: transform 0.2s;
}

.tarjeta:hover { transform: translateY(-3px); box-shadow: 0 5px 12px rgba(0,0,0,0.05); }
.tarjeta img { width: 100%; height: 80px; object-fit: contain; }
.tarjeta h4 { font-size: 13px; margin: 10px 0; height: 32px; overflow: hidden; }

/* ================= CARRITO ================= */
.carrito-container {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #ddd;
}

.badge-total {
    background: #007a5a;
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 14px;
}

/* ================= BOTONES (ESTÉTICA ORIGINAL) ================= */
button {
    width: 100%;
    padding: 14px;
    background: #007a5a;
    border: none;
    color: white;
    border-radius: 12px;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

button:hover { background: #005a44; transform: translateY(-2px); }

/* ================= MODALES Y LOADER ================= */
.modal, .modal-canje {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.7);
    display: flex; justify-content: center;
    align-items: center; z-index: 3000;
}

.modal-content {
    background: white; padding: 30px;
    border-radius: 20px; width: 90%; max-width: 450px;
    text-align: center;
}

.loader-overlay {
    position: fixed; inset: 0;
    background: rgba(255,255,255,0.9);
    display: none; flex-direction: column;
    align-items: center; justify-content: center;
    z-index: 5000;
}
.loader-overlay.active { display: flex; }

/* ================= TOAST (AVISO DE AGREGADO - NUEVA FUNCIÓN) ================= */
#toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 10px 20px;
    border-radius: 20px;
    z-index: 9999;
    font-size: 14px;
}

/* ================= RESPONSIVO (2 COLUMNAS EN CELULAR) ================= */
@media (max-width: 768px) {
    .main-layout { flex-direction: column; }
    .col-side { width: 100%; position: static; order: -1; }
    .tienda-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 10px; }
    .saldo-banner { flex-direction: column; text-align: center; gap: 10px; }
}
