@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
}

body {
    background-color: #ffffff; /* Fondo blanco absoluto para evitar cortes */
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden; /* Evita cualquier scroll */
}

/* Contenedor principal sin sombras para que se fusione con la pantalla */
.app-container {
    width: 100%;
    max-width: 450px; 
    height: 100vh;
    height: 100dvh; /* Soporte moderno para móviles */
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
}

/* Área superior */
.top-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    flex-grow: 1;
}

/* Logo (Aumentado un 40%) */
.logo-container {
    margin-top: 8%; /* Ligeramente ajustado para el logo más grande */
    margin-bottom: 25px;
}

.logo {
    height: 100px; /* Antes estaba en 72px, ahora es notablemente más grande */
    object-fit: contain;
}

/* Formularios */
.form-container {
    width: 100%;
    padding: 0 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.input-label {
    font-size: 18px;
    font-weight: 500;
    color: #333333;
    margin-bottom: 12px;
}

.mt-custom {
    margin-top: 30px;
}

/* Input del celular */
.phone-input {
    width: 100%;
    height: 50px;
    border: 1px solid #cccccc;
    border-radius: 8px;
    font-size: 20px;
    text-align: center;
    outline: none;
    letter-spacing: 2px;
    color: #333;
    transition: border-color 0.3s;
}

.phone-input:focus {
    border-color: #e57223;
}

/* Inputs del PIN */
.pin-container {
    display: flex;
    gap: 12px;
    justify-content: center;
    width: 100%;
}

.pin-box {
    width: 60px;
    height: 60px;
    border: 1px solid #cccccc;
    border-radius: 10px;
    font-size: 32px; 
    text-align: center;
    outline: none;
    color: #333;
    transition: border-color 0.3s;
    -webkit-text-security: disc;
}

.pin-box:focus {
    border-color: #e57223;
}

/* Link de olvidar contraseña */
.forgot-link {
    margin-top: 25px;
    color: #d1752e;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

/* Diseño inferior con fondo.webp */
.bottom-shape {
    width: 100%;
    height: 32%; 
    min-height: 220px;
    /* OPTIMIZACIÓN: Cambio a .webp */
    background: url('fondo.webp') no-repeat center bottom;
    background-size: 100% 100%; 
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding-bottom: 25px;
}

/* Botón de Ingresar */
.login-btn {
    background-color: #ffffff;
    color: #df7023;
    border: none;
    border-radius: 12px;
    width: 85%;
    height: 55px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    margin-bottom: 25px;
    transition: transform 0.1s;
}

.login-btn:active {
    transform: scale(0.98);
}

.version-text {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    margin-bottom: 10px;
}

/* Estilos del Modal */
.modal-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    background: #ffffff;
    width: 85%;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-title {
    color: #333;
    margin-bottom: 10px;
    font-size: 20px;
}

.modal-text {
    color: #666;
    font-size: 15px;
    line-height: 1.5;
    margin-bottom: 25px;
}

.modal-btn {
    background: linear-gradient(to right, #fca234, #ed691f);
    color: white;
    border: none;
    padding: 12px 35px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 3px 8px rgba(237, 105, 31, 0.3);
}
