
:root {
    --login-primary: #07558e;
    --login-primary-dark: #073568;
    --login-text: #252525;
    --login-muted: #757575;
    --login-border: #dddddd;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    -webkit-text-size-adjust: 100%;
}

body.rodriguez-login {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    font-family: -apple-system, BlinkMacSystemFont,
                 "Segoe UI", Roboto, Arial, sans-serif;
    background: linear-gradient(
        135deg, #f8f8f8, #e9e9e9
    );
    color: var(--login-text);
}

.login-container {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    padding-top: max(24px, env(safe-area-inset-top));
    padding-bottom: max(24px, env(safe-area-inset-bottom));
}

.login-panel {
    width: 100%;
    max-width: 430px;
    background: white;
    border-radius: 18px;
    padding: 34px;
    box-shadow: 0 12px 40px rgba(0,0,0,.10);
}

.login-header {
    text-align: center;
}

.login-logo {
    display: block;
    width: auto;
    max-width: 210px;
    max-height: 105px;
    height: auto;
    object-fit: contain;
    margin: 0 auto 20px;
}

.login-header h1 {
    font-size: 21px;
    line-height: 1.3;
    margin: 0 0 8px;
    font-weight: 700;
    color: var(--login-primary);
}

.login-header p {
    font-size: 14px;
    color: var(--login-muted);
    margin: 0;
}

.login-content {
    margin-top: 32px;
}

.login-content h2 {
    font-size: 23px;
    text-align: center;
    margin: 0 0 8px;
}

.login-subtitle {
    text-align: center;
    color: var(--login-muted);
    font-size: 13px;
    margin: 0 0 28px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
}

.form-group input {
    display: block;
    width: 100%;
    min-width: 0;
    height: 50px;
    padding: 0 14px;
    border: 1px solid var(--login-border);
    border-radius: 10px;
    font-size: 16px;
    background: white;
    color: var(--login-text);
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}

.form-group input:focus {
    border-color: var(--login-primary);
    box-shadow: 0 0 0 3px rgba(139,0,0,.10);
}

.password-wrapper {
    position: relative;
}

.password-wrapper input {
    padding-right: 88px;
}

.toggle-password {
    position: absolute;
    right: 7px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: var(--login-primary);
    font-size: 13px;
    font-weight: 600;
    padding: 12px 10px;
    min-height: 44px;
    cursor: pointer;
}

.btn-login {
    display: block;
    width: 100%;
    height: 52px;
    background: var(--login-primary);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s;
}

.btn-login:hover {
    background: var(--login-primary-dark);
}

.btn-login:disabled {
    opacity: .7;
    cursor: wait;
}

.login-error {
    margin-bottom: 20px;
    padding: 12px;
    border-radius: 8px;
    background: #eaf3fa;
    color: #a00000;
    border: 1px solid #f1c5c5;
    font-size: 14px;
    text-align: center;
}

.login-footer {
    text-align: center;
    margin-top: 32px;
    border-top: 1px solid #eeeeee;
    padding-top: 18px;
}

.login-footer p {
    margin: 4px 0;
    color: #999999;
    font-size: 12px;
}

/* Celulares Android y iPhone */
@media (max-width: 600px) {

    body.rodriguez-login {
        background: #ffffff;
    }

    .login-container {
        align-items: center;
        padding: 22px 20px;
        padding-top: max(22px, env(safe-area-inset-top));
        padding-bottom: max(22px, env(safe-area-inset-bottom));
    }

    .login-panel {
        max-width: 420px;
        box-shadow: none;
        border-radius: 0;
        padding: 12px 4px;
    }

    .login-logo {
        max-width: 185px;
        max-height: 95px;
    }

    .login-header h1 {
        font-size: 19px;
    }

    .login-content {
        margin-top: 30px;
    }

    .login-content h2 {
        font-size: 22px;
    }

    .login-footer {
        margin-top: 28px;
    }
}

/* Pantallas pequeñas o en horizontal */
@media (max-height: 650px) {
    .login-container {
        align-items: flex-start;
    }

    .login-panel {
        margin: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        transition: none !important;
    }
}

