body {
    background-color: #edeef1;
}

/*Login*/
.dashboard-login {
  display: flex;         /* Activa el modo flexible */
  flex-direction: column;
  gap: 20px;             /* Espacio entre cartas */
}

.primer-cuadro {
  display: flex;
  gap: 100px;
  justify-content: center;
  padding: 3rem;
}

.interior {
  width: 25%;
  height: 500px;
  max-height: 85%;
  padding: 2rem;
  background-color: white;
  border-radius: 20px;
  justify-content: center;
}

.logo {
  width: 66px;
  max-width: 20%;
  height:22px;
}

.contenido-login {
  padding: 20px 40px  0px 40px;
  justify-items: center;
  justify-content: center;
  font-family: "Poppins", sans-serif;
  font-style: normal;
}

.texto-login {
  font-size: 100;
  color: #555;
}

.boton-login {
  margin: 0 auto;
  width: 80%;
  border: 1px solid #888;
  color: #888;
  padding: 8px 16px;
  border-radius: 8px;
}

.contenedor-olvide-contrasena {
  display: flex;
  gap: 5px;
  justify-content: right;
}

.olvide-contrasena {
  font-size: 12px;
  color: black;
  text-align: right;
  padding: 4px 0px 0px 0px;
}

.espacio {
  padding: 2px;
}

.olvide-contrasena:hover {
  padding: 4px 0px 0px 0px;;
  color:#1b3dff;
}

.segundo {
  width: 30%;
  height: 550px;
  max-height: 85%;
  background-color: black;
  border-radius: 20px;
  padding: 8px;
  overflow: hidden;
  position: relative; /*Referencia pra los hijos*/
}

.fondo {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.animacion {
  position: absolute;
  top: 65%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50%;
  z-index: 2;
}

.boton {
    width: 100%;
    display: inline-block;
    padding: 10px 20px;
    background-color: #333;
    color: rgb(255, 255, 255);
    border: 1px solid #333;
    text-decoration: none;
    border-radius: 50px;
    cursor: pointer;
}

.boton:hover {
  width: 100%;
  display: inline-block;
  padding: 10px 20px;
  background-color: #3e95ff;
  border: 1px solid #3e95ff;
  color: white;
  border-radius: 50px;
  transition: 0.3s;
}

.texto-cuenta {
  gap: 5px;
  justify-content: center;
  font-size: 12px;
  padding: 0px 0px 5px 0px;
}

/*CREAR CUENTA*/
.interior-cuenta {
  width: 25%;
  height: 600px;
  max-height: 90%;
  padding: 2rem;
  background-color: white;
  border-radius: 20px;
  justify-content: center;
}

.contenedor-titulo {
  display: flex;
  justify-content: center;  /*Alinea horizontal*/
  align-items: center;      /*Alinea vertical*/
  font-size: 12px;
}

.titulo {
  font-size: 25px;
  font-weight: 600;
  font-style: bold;
  line-height: 1.1;
  text-align: center;
}

.subtitulo {
  font-size: 12px;
  font-weight: 200;
  font-style: normal;
  line-height: 1.2;
}

.texto-cuenta-corrido {
  display:flex;
  gap: 5px;
  justify-content: center;
  align-items: center;
  font-size: 14px;
}

.aviso {
  cursor: pointer;
}

/*REESTABLECER CONTRASEÑA*/

.interior-contrasena {
  width: 25%;
  max-height: 70%;
  padding: 2rem;
  background-color: white;
  border-radius: 20px;
  justify-content: center;
}

.texto-cuenta-corrido-contrasena {
  display: flex;
  padding: 10px;
  gap: 5px;
  justify-content: center;
  align-items: center;
  font-size: 14px;
  
}

/*DASHBOARD*/

.dashboard {
  display: flex;         /* Activa el modo flexible */
  flex-direction: column;
  gap: 30px;             /* Espacio entre cartas */
}

.tarjeta {
  display: flex;
  justify-content: center;
}

.card_saldo {
  width: 90%;
  height: 150px;
  padding: 20px;
  background-color: rgb(30, 30, 30);
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  color: white;
  font-family: "Poppins", sans-serif;
  font-weight: 200;
  font-style: normal;
  font-size: 20px;
}

.card_header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.info {
  cursor: pointer;
  font-size: 14px;
  color: #9da0a6;
}

/* Muestra el texto al pasar el ratón (PC) O al tocar la pantalla (Celular) */
.contenedor-info:hover .tooltip-text,
.contenedor-info:focus .tooltip-text,
.contenedor-info:active .tooltip-text {
  display: block; 
}

/* Quitamos el borde azul feo que le ponen los celulares al hacer foco */
.contenedor-info {
  position: relative;
  outline: none; 
}

.tooltip-text {
  display: none;
  position: absolute;
  background-color: #333;
  color: white;
  padding: 15px;
  border-radius: 5px;
  z-index: 100; /* Para que quede encima de todo*/
  top: 100%; /* Lo posiciona justo debajo del icono*/
  right: -10px;
  width: 260px; /*Ancho para que no se vea como una línea larga*/
  font-size: 13px;
  line-height: 1.4;
  box-shadow: 0px 4px 10px rgba(0,0,0,0.5);
}

.contenedor-tendencia {
    flex-grow: 1;           /* Que ocupe todo el ancho disponible */           
    max-width: 75%;          /* Opcional: deja un margen a los lados */
    height: 100px;           /* Altura fija: IMPORTANTE para que se vea */
    margin-left: 10px;          /* TRUCO DE MAGIA: Esto lo centra horizontalmente */
    position: relative;
    transition: width 2s ease-in-out;
}

.card_body {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  width: 95%;
}

.cantidad {
  margin: 20px 0px 0px 0px;
  white-space: nowrap;
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  font-style: bold;
  font-size: 60px;
}

.cantidad_rendimiento {
  margin: 0;
  white-space: nowrap;
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  font-style: bold;
  font-size: 40px;
  color: #6eda6e;
}

.fila {
  display: flex;
  gap: 20px;
  justify-content: center;
}

.card {
  width: 42%;
  height: 150px;
  padding: 20px;
  background-color: rgb(255, 255, 255);
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  font-family: "Poppins", sans-serif;
  font-weight: 200;
  font-style: normal;
  font-size: 20px;
}

/* ========================================================
   DISEÑO RESPONSIVO (PANTALLAS PEQUEÑAS - CELULARES Y TABLETS)
   ======================================================== */
@media (max-width: 768px) {

    /* --- LOGIN, CREAR CUENTA Y RECUPERAR --- */
    .primer-cuadro {
        flex-direction: column; /* Apila las cajas verticalmente */
        padding: 1rem; 
        gap: 30px; 
        align-items: center; 
    }

    /* Ajustamos TODAS las cajas blancas y el fondo animado negro */
    .interior, 
    .interior-cuenta, 
    .interior-contrasena,
    .segundo {
        width: 100%; /* Ocupan todo el ancho de la pantalla */
        max-width: 400px; 
        height: auto; /* Crecen según el texto */
        min-height: 350px; 
        padding: 1.5rem; 
        box-sizing: border-box; /* Evita que el relleno rompa el celular */
    }

    .segundo {
        min-height: 250px; 
    }

    .titulo {
        font-size: 22px; 
    }
    
    .boton-login {
        width: 100%; 
        box-sizing: border-box; 
    }

    /* --- DASHBOARD (Ahorros e Inversiones) --- */
    .dashboard {
        gap: 15px; /* Reduce el espacio entre bloques principales */
    }

    .card_saldo {
        width: 100%; /* Que ocupe toda la pantalla de orilla a orilla */
        height: auto; 
        padding: 15px;
        box-sizing: border-box;
    }

    .cantidad {
        font-size: 40px; /* Reducimos el número gigante para que quepa */
        margin-top: 10px;
    }

    /* Apilamos las tarjetitas de ahorro e inversión */
    .fila {
        flex-direction: column; /* Cambia de lado a lado, hacia arriba y abajo */
        align-items: center; 
        gap: 15px; 
    }

    .card {
        width: 100%; /* Tarjetas al 100% del ancho del celular */
        height: auto;
        padding: 15px;
        min-height: 120px; 
        box-sizing: border-box;
    }

    .cantidad_rendimiento {
        font-size: 30px; 
    }

    /* Ajustes para que la gráfica no se deforme */
    .contenedor-tendencia {
        max-width: 100%; 
        margin-left: 0; 
        height: 60px; /* Hacemos la gráfica un poco más delgada en celular */
    }

    .card_body {
        flex-direction: column; 
        align-items: flex-start; 
        gap: 10px;
    }
}