* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    min-height: 100%;
    min-height: 100dvh;
    margin: 0;
    padding: 0;
    -webkit-text-size-adjust: 100%;
}

body {
    background-color: #141C29;
    color: white;
    font-family: 'Space Grotesk', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    min-height: 100dvh;
    background-image: radial-gradient(circle at top right, #2D4263, #141C29);
    overflow-x: hidden;
    touch-action: pan-x pan-y;
}

.container-form {
    display: flex;
    width: 900px;
    max-width: 95%;
    background: #2D4263;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    margin: auto;
}

.information {
    flex: 1;
    background: linear-gradient(135deg, #007bffbe, #0056b3);
    color: white;
    padding: 45px 35px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.info-childs {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    width: 100%;
}

.information h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 2rem;
    margin-bottom: 10px;
    font-weight: 700;
    text-align: center;
    width: 100%;
}

.information p {
    font-size: 1rem;
    line-height: 1.5;
    text-align: center;
    width: 100%;
}

.form-information {
    flex: 1;
    padding: 45px 35px;
    background: #1e2b40;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.form-information-childs {
    width: 100%;
    max-width: 360px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    margin: auto;
}

.form-information h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 2rem;
    margin-bottom: 10px;
    text-align: center;
    color: white;
    width: 100%;
}

.form-information p {
    text-align: center;
    color: #a2b3c7;
    margin-bottom: 25px;
    width: 100%;
}

.form-login {
    width: 100%;
}

.form-login div {
    position: relative;
    margin-bottom: 18px;
    width: 100%;
}

.form-login i {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 15px;
    color: #a2b3c7;
    font-size: 1.3rem;
}

.form-login i#togglePassword {
    left: auto;
    right: 15px;
    cursor: pointer;
    color: #a2b3c7;
    transition: color 0.3s;
}

.form-login i#togglePassword:hover {
    color: white;
}

.form-login input[type="text"],
.form-login input[type="password"] {
    width: 100%;
    padding: 14px 45px;
    border: 1px solid #405a7e;
    border-radius: 10px;
    background: #141C29;
    color: white;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s;
    font-family: 'Space Grotesk', sans-serif;
}

.form-login input[type="text"]:focus,
.form-login input[type="password"]:focus,
.form-login label select:focus {
    border-color: #007bff;
    box-shadow: 0 0 8px rgba(0, 123, 255, 0.4);
}

.form-login input[type="text"]::placeholder,
.form-login input[type="password"]::placeholder,
.form-login label::placeholder {
    color: #6c7a8c;
}

/* Selector de Rol Personalizado */
.form-login .custom-select-wrapper {
    width: 100%;
    position: relative;
}

.form-login .custom-select-trigger {
    width: 100%;
    height: 49px;
    padding: 12px 38px 12px 45px;
    background: #141C29;
    border: 1px solid #405a7e;
    border-radius: 10px;
    color: white;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1rem;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
    cursor: pointer;
}

.form-login .custom-select-trigger:hover,
.form-login .custom-select-trigger.is-open,
.form-login .custom-select-trigger:focus-visible {
    border-color: #007bff;
    box-shadow: 0 0 8px rgba(0, 123, 255, 0.4);
    background: #141C29;
}

.form-login .custom-select-trigger .trigger-text {
    color: white;
    font-size: 1rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
}

.form-login .custom-select-trigger .trigger-text.is-placeholder {
    color: #6c7a8c;
    font-weight: 400;
}

.form-login .custom-select-trigger .trigger-arrow {
    color: #a2b3c7;
    margin-left: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.form-login label select {
    display: none;
}

.form-login input[type="submit"] {
    width: 100%;
    padding: 14px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
    margin-top: 10px;
    font-family: 'Montserrat', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
}

.form-login input[type="submit"]:hover {
    background: #0056b3;
    transform: translateY(-2px);
}

.form-login input[type="submit"]:active {
    transform: translateY(0);
}

/* Acciones y Botones */
.login-actions-container {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    margin-top: 15px;
    width: 100%;
}

.btn-visitar-tienda {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    background-color: #2D4263;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    font-size: 0.9rem;
    border: 1px solid #405a7e;
    transition: all 0.3s;
}

.btn-visitar-tienda:hover {
    background-color: #405a7e;
    transform: translateY(-2px);
}

.btn-instalar-admin-inline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    background: linear-gradient(135deg, #d4af37, #b38f2a);
    color: #0b101e;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(212, 175, 55, 0.4);
    font-family: inherit;
    transition: all 0.3s;
}

.btn-instalar-admin-inline:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(212, 175, 55, 0.6);
}

/* Ocultar iconos sociales ya que no se usan */
.icons {
    display: none;
}

.info-childs .logo-principal {
    width: 140px;
    height: auto;
    margin: 0 auto 5px auto;
    display: block;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.4));
}

.info-childs #titulo-logov {
    width: 180px;
    height: auto;
    margin: 0 auto 15px auto;
    display: block;
}

/* =======================================================
   RESPONSIVO PARA MÓVILES (Proporciones Perfectas, Sin Huecos Vacíos, Cero Scroll)
   ======================================================= */
@media (max-width: 768px) {
    body {
        padding: 12px 10px;
    }

    .container-form {
        flex-direction: column;
        border-radius: 18px;
        margin: auto;
        width: 100%;
        max-width: 420px;
        height: auto;
        display: flex;
        overflow: hidden;
        box-shadow: 0 12px 35px rgba(0, 0, 0, 0.5);
    }

    .information {
        padding: 20px 16px 16px 16px;
        border-radius: 18px 18px 0 0;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        background: linear-gradient(135deg, #007bffbe, #0056b3);
        color: white;
        text-align: center;
    }

    .info-childs {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        width: 100%;
        margin: 0 auto;
    }

    .info-childs .logo-principal {
        width: 110px;
        height: auto;
        max-height: 110px;
        object-fit: contain;
        margin: 0 auto 4px auto;
        display: block;
        filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.4));
    }

    .info-childs #titulo-logov {
        width: 150px;
        height: auto;
        max-height: 40px;
        object-fit: contain;
        margin: 0 auto 6px auto;
        display: block;
    }

    .info-childs h2 {
        font-family: 'Montserrat', sans-serif;
        font-size: 1.35rem;
        margin-bottom: 2px;
        font-weight: 700;
        line-height: 1.2;
        text-align: center;
    }

    .info-childs p {
        font-size: 0.88rem;
        margin: 0 0 8px 0;
        line-height: 1.3;
        color: #f0f4f8;
        text-align: center;
    }

    .login-actions-container {
        margin: 4px auto 0 auto;
        gap: 8px;
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
    }

    .btn-visitar-tienda {
        margin: 0 !important;
        padding: 8px 14px !important;
        font-size: 0.82rem !important;
        background-color: #2D4263 !important;
        border: 1px solid #405a7e !important;
        color: white !important;
        border-radius: 8px !important;
    }

    .btn-instalar-admin-inline {
        margin: 0 !important;
        padding: 8px 14px !important;
        font-size: 0.82rem !important;
        border-radius: 8px !important;
        display: inline-flex !important;
    }

    .form-information {
        padding: 18px 20px 22px 20px;
        border-radius: 0 0 18px 18px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
        background: #1e2b40;
    }

    .form-information-childs {
        width: 100%;
        max-width: 360px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
        margin: 0 auto;
    }

    .form-information-childs h2 {
        font-family: 'Montserrat', sans-serif;
        font-size: 1.35rem;
        margin-bottom: 2px;
        text-align: center;
        color: white;
        width: 100%;
    }

    .form-information-childs p {
        text-align: center;
        color: #a2b3c7;
        margin-bottom: 12px;
        font-size: 0.88rem;
        width: 100%;
    }

    .form-login {
        width: 100%;
    }

    .form-login div {
        margin-bottom: 11px;
        position: relative;
        width: 100%;
    }

    .form-login input[type="text"],
    .form-login input[type="password"] {
        width: 100%;
        padding: 12px 42px 12px 42px;
        font-size: 16px !important; /* Previene auto-zoom en iOS Safari */
        border-radius: 9px;
    }

    .form-login .custom-select-trigger {
        height: 45px;
        padding: 10px 32px 10px 42px;
        font-size: 16px !important;
        border-radius: 9px;
    }

    .form-login .custom-select-trigger .trigger-text {
        font-size: 16px !important;
    }

    .form-login i {
        font-size: 1.15rem;
        left: 14px;
    }

    .form-login i#togglePassword {
        right: 14px;
    }

    .form-login input[type="submit"] {
        width: 100%;
        padding: 12px;
        margin-top: 4px;
        font-size: 1rem;
        font-weight: 600;
        border-radius: 9px;
    }

    .alerta-error {
        padding: 6px 10px !important;
        font-size: 0.82rem !important;
        margin-bottom: 8px !important;
    }
}