/* css/style.css */

:root {
    --sidebar-width: 280px;
    --color-cream: #FDF0D5;
    --color-light-green: #C6D8D3;
    --color-green: #678478;
    --color-dark-green: #597167;
    --color-brown: #5E3023;
    --color-text: #333333;
}

body {
    background-color: var(--color-cream);
    color: var(--color-text);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* --- Estilos para el Menú Lateral (Offcanvas) --- */
.sidebar {
    background-color: var(--color-green);
    color: white;
}
.sidebar .offcanvas-title a,
.sidebar a, 
.sidebar .dropdown-toggle {
    color: white;
}
.sidebar .nav-link:hover, 
.sidebar .dropdown-item:hover {
    background-color: var(--color-dark-green);
}
.sidebar .nav-link.active {
    background-color: var(--color-brown);
}
.sidebar hr {
    border-color: rgba(255, 255, 255, 0.2);
}

/* --- ESTA ES LA MAGIA PARA LA VISTA DE ESCRITORIO --- */
@media (min-width: 992px) { /* lg breakpoint de Bootstrap */
    .main-content {
        /* Dejamos el espacio para el menú lateral fijo */
        margin-left: var(--sidebar-width);
    }
    
    /* Selector más específico para anular Bootstrap */
    body .sidebar.offcanvas-start {
        /* Hacemos que el menú sea visible y se comporte como un bloque fijo */
        position: fixed;
        width: var(--sidebar-width);
        
        /* Anulamos la transformación que lo oculta */
        transform: translateX(0) !important; 
        
        /* Anulamos la visibilidad que lo oculta */
        visibility: visible !important;
    }

    /* Ocultamos el botón de cerrar en la vista de escritorio */
    .sidebar .btn-close {
        display: none;
    }
}

/* --- Estilos Generales --- */
.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}
.card-icon {
    font-size: 3em;
    opacity: 0.7;
}
.card .card-title {
    font-weight: bold;
    color: var(--color-dark-green);
}
.table {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
}
.btn-action {
    color: var(--color-dark-green);
    text-decoration: none;
    padding: 5px 8px;
    transition: color 0.2s;
}
.btn-action:hover {
    color: var(--color-brown);
}
/* --- ESTILOS PARA BILLETERAS VIRTUALES (Versión Premium) --- */
.card-billetera {
    background: linear-gradient(135deg, #2d3436, #1a1a1a);
    color: white;
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    height: 285px;
    transition: transform 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* Un brillo sutil para darle un toque "glossy" */
.card-billetera::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 60%);
    transform: rotate(25deg);
}

.card-billetera:hover {
    transform: scale(1.03);
}

.card-billetera-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

/* El Chip de la tarjeta */
.chip {
    width: 50px;
    height: 40px;
    background: linear-gradient(135deg, #f0c94b, #e6b73a);
    border-radius: 6px;
    border: 1px solid rgba(0,0,0,0.2);
}

/* El logo (ej. Visa) */
.card-logo {
    font-size: 2.5em;
    color: rgba(255, 255, 255, 0.8);
}

.card-billetera-body {
    margin-bottom: 20px;
}

.card-billetera-label {
    font-size: 0.9em;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.card-billetera-balance {
    font-size: 2.3em;
    font-weight: 600;
    margin-top: 5px;
}

.card-billetera-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.card-details {
    font-family: 'Courier New', Courier, monospace;
}

/* El nombre de la billetera (formateado como número) */
.card-number {
    font-size: 1.2em;
    letter-spacing: 2px;
    opacity: 0.9;
}

/* Tu nombre como titular */
.card-name {
    font-size: 0.9em;
    text-transform: uppercase;
    opacity: 0.7;
    margin-top: 5px;
}

/* Botón de recargar rediseñado */
.btn-recargar {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.5);
    padding: 8px 15px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.2s, border-color 0.2s;
}

.btn-recargar:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.8);
    color: white;
}
/* --- ESTILOS PARA BILLETERAS VIRTUALES (Versión Premium) --- */
/* ... (Todo tu código de tarjeta que ya existe va aquí) ... */
.btn-recargar:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.8);
    color: white;
}


/* --- NUEVO: MEDIA QUERY PARA MÓVILES --- */
@media (max-width: 576px) {
    .card-billetera {
        /* Hacemos la tarjeta un poco más baja */
        height: auto;
        min-height: 200px; 
        padding: 20px; /* Reducimos el padding general */
    }

    /* Reducimos el tamaño del chip */
    .chip {
        width: 40px;
        height: 32px;
    }

    /* Reducimos el logo (Visa) */
    .card-logo {
        font-size: 2em;
    }

    /* Reducimos el tamaño del balance (el texto más grande) */
    .card-billetera-balance {
        font-size: 1.9em;
    }

    /* Reducimos los textos del pie de la tarjeta */
    .card-number {
        font-size: 1.1em;
    }
    .card-name {
        font-size: 0.85em;
    }
    
    /* Hacemos el botón un poco más pequeño */
    .btn-recargar {
        padding: 6px 12px;
        font-size: 0.9em;
    }
}
/* --- ESTILOS PARA LA TARJETA BILLETERA CLICABLE --- */

/* 1. Estilos para el enlace que envuelve la tarjeta */
.billetera-link-wrapper {
    text-decoration: none; /* Quita el subrayado azul del enlace */
    color: white; /* Hereda el color de la tarjeta */
}
.billetera-link-wrapper:hover {
    color: white; /* Mantiene el color al pasar el mouse */
}

/* 2. Ajustes para el botón "Recargar" (ahora es un <button>) */
.btn-recargar {
    /* Nos aseguramos que tenga un z-index para estar "por encima" del enlace principal */
    position: relative;
    z-index: 2;

    /* Reseteamos estilos de <button> para que se vea como el <a> anterior */
    font-family: inherit; /* Usa la misma fuente de la app */
    font-size: 1em;     /* Ajusta si es necesario */
    cursor: pointer;      /* Muestra la manito */
}