/* =========================================================
   LOGIN — SISTEMA GAS LP
   Hoja exclusiva del acceso. No modifica operador ni admin.
   ========================================================= */

*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {
    --login-blue: #1f67aa;
    --login-blue-dark: #174f86;
    --login-bg: #f1efea;
    --login-card: #ffffff;
    --login-text: #20201e;
    --login-muted: #72716c;
    --login-border: #d7d5cf;
    --login-danger-bg: #fff0f0;
    --login-danger-text: #8b2525;
}

html,
body {
    min-height: 100%;
    margin: 0;
}

body {
    min-height: 100vh;
    min-height: 100dvh;
    padding: 32px 20px;

    display: flex;
    align-items: center;
    justify-content: center;

    font-family: Inter, ui-sans-serif, system-ui, -apple-system,
        BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--login-text);
    background: var(--login-bg);
}

.login-card {
    width: min(100%, 440px);
    padding: 38px 40px 32px;

    background: var(--login-card);
    border: 1px solid var(--login-border);
    border-radius: 16px;
    box-shadow: 0 18px 48px rgba(38, 37, 34, 0.10);
}

.brand {
    margin-bottom: 28px;
    text-align: center;
}

.brand-logo {
    display: block;
    width: 165px;
    max-width: 70%;
    height: auto;
    margin: 0 auto 16px;
    object-fit: contain;
}

.brand-name {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
}

.brand-subtitle {
    margin-top: 5px;
    font-size: 13px;
    color: var(--login-muted);
}

.field {
    margin-bottom: 17px;
}

.field-password {
    margin-bottom: 9px;
}

.field-label {
    display: block;
    margin-bottom: 7px;
    font-size: 13px;
    font-weight: 600;
    color: #4f4e4a;
}

.input-control {
    width: 100%;
    height: 48px;
    padding: 0 14px;

    font: inherit;
    font-size: 16px;
    color: var(--login-text);
    background: #fff;

    border: 1px solid #bdbbb5;
    border-radius: 9px;
    outline: none;

    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input-control::placeholder {
    color: #a09f99;
}

.input-control:focus {
    border-color: var(--login-blue);
    box-shadow: 0 0 0 4px rgba(31, 103, 170, 0.13);
}

.login-hint {
    margin: 0 0 18px;
    font-size: 12px;
    line-height: 1.5;
    color: var(--login-muted);
}

.login-error {
    margin-bottom: 18px;
    padding: 11px 13px;
    font-size: 13px;
    line-height: 1.45;
    color: var(--login-danger-text);
    background: var(--login-danger-bg);
    border: 1px solid #ecc6c6;
    border-radius: 9px;
}

.login-button {
    width: 100%;
    height: 48px;
    padding: 0 18px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    font: inherit;
    font-size: 15px;
    font-weight: 700;
    color: #fff;

    background: var(--login-blue);
    border: 0;
    border-radius: 9px;
    cursor: pointer;

    transition: background 0.15s ease, transform 0.05s ease;
}

.login-button:hover {
    background: var(--login-blue-dark);
}

.login-button:focus-visible {
    outline: 4px solid rgba(31, 103, 170, 0.2);
    outline-offset: 2px;
}

.login-button:active {
    transform: translateY(1px);
}

.forgot-text {
    margin: 16px 0 0;
    text-align: center;
    font-size: 12px;
    line-height: 1.5;
    color: var(--login-muted);
}

/* En celular conserva una tarjeta cómoda sin salirse de la pantalla. */
@media (max-width: 600px) {
    body {
        padding: 18px;
        align-items: center;
    }

    .login-card {
        width: 100%;
        padding: 30px 22px 26px;
        border-radius: 14px;
    }

    .brand {
        margin-bottom: 24px;
    }

    .brand-logo {
        width: 145px;
        margin-bottom: 14px;
    }

    .brand-name {
        font-size: 18px;
    }

    .input-control,
    .login-button {
        height: 46px;
    }
}

/* En pantallas muy bajas evita que se corte el contenido. */
@media (max-height: 620px) and (min-width: 601px) {
    body {
        align-items: flex-start;
    }
}
