/* Fondo general */
html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    box-sizing: border-box;
    background-color: #f2f2f2;
    font-family: 'Open Sans', sans-serif;
    /* Aplicar tipografía Open Sans */
}

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    width: 100%;
    max-width: 100vw;
}

/* Caja blanca con bordes redondeados */
.login-box {
    background-color: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 320px;
    text-align: center;
    box-sizing: border-box;
}

/* Logo */
.logo {
    margin-bottom: 10px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    height: 70px;
}

/* Título */
h2 {
    font-family: 'Open Sans', sans-serif;
    font-weight: 600;
    /* Peso semibold para el título */
    color: #333;
    margin-bottom: 20px;
}

/* Formulario */
form {
    display: block;
    unicode-bidi: isolate;
}

/* Etiquetas */
form label {
    display: block;
    text-align: left;
    margin-bottom: 5px;
    font-weight: 600;
    /* Peso semibold para las etiquetas */
    color: #555;
}

/* Inputs */
form input[type="text"],
form input[type="password"] {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
    font-family: 'Open Sans', sans-serif;
    font-size: 14px;
}

.password-wrap {
    position: relative;
    margin-top: 5px;
    margin-bottom: 15px;
}

.password-wrap input {
    margin-top: 0;
    margin-bottom: 0;
    padding-right: 40px;
}

.password-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: auto;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle:hover {
    background: none;
}

/* Botón */
form button {
    background-color: #007bff;
    color: white;
    padding: 10px;
    width: 100%;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    font-family: 'Open Sans', sans-serif;
    font-weight: 600;
    /* Peso semibold para el botón */
}

form button:hover {
    background-color: #0056b3;
}

form button:disabled {
    background-color: #aaa;
    cursor: not-allowed;
}

.terms-check {
    margin-top: 15px;
    text-align: left;
}

.terms-check label {
    margin-top: 2px;
    gap: 8px;
    font-size: 11px;
    font-weight: 400;
    color: #666;
    cursor: pointer;
    line-height: 1.4;
}

.terms-check input[type="checkbox"] {
    margin-top: 2px;
    flex-shrink: 0;
    cursor: pointer;
}

.terms-check a {
    color: #007bff;
    text-decoration: underline;
}

.terms-check a:hover {
    color: #0056b3;
}

/* Error */
.error {
    color: red;
    margin-bottom: 15px;
    font-family: 'Open Sans', sans-serif;
    font-weight: 600;
    /* Peso semibold para los errores */
}

@media (max-width: 480px) {

    html,
    body {
        margin: 0;
        padding: 0;
        width: 100vw;
        height: 100vh;
        overflow-x: hidden;
        box-sizing: border-box;
        background-color: #f2f2f2;
    }

    .login-container {
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 0;
        margin: 0;
        width: 100vw;
        height: 100vh;
    }

    .login-box {
        width: 100%;
        max-width: 360px;
        /* límite para que no se estire */
        margin: 40px 15px;
        /* espacio a los costados */
        padding: 40px 20px;
        border-radius: 15px;
        box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
    }

    .logo {
        width: 100%;
        height: auto;
        margin-bottom: 20px;
    }

    form input[type="text"],
    form input[type="password"] {
        font-family: 'Open Sans', sans-serif;
        font-size: 18px;
        padding: 14px;
    }

    .password-wrap input {
        padding-right: 44px;
    }

    form button {
        font-family: 'Open Sans', sans-serif;
        font-size: 18px;
        padding: 14px;
        font-weight: 600;
    }

    h2 {
        font-family: 'Open Sans', sans-serif;
        font-size: 22px;
        font-weight: 600;
    }

    .error {
        font-family: 'Open Sans', sans-serif;
        font-weight: 600;
    }
}