/**
 * Login clásico mejorado y neutral.
 * Conserva la estructura tradicional del sistema sin adoptar
 * la identidad visual de SOPESA ni el diseño del tema Fresh.
 */

* {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    padding: 42px 16px;
    background: #eef1f5;
    color: #253044;
    font: 14px "Segoe UI", Arial, Helvetica, sans-serif;
    text-align: center;
}

img {
    max-width: 100%;
    vertical-align: middle;
}

#container.login-card {
    width: 100%;
    max-width: 410px;
    margin: 0 auto;
    padding: 30px 34px 24px;
    background: #ffffff;
    border: 1px solid #d6dce5;
    border-radius: 14px;
    box-shadow: 0 14px 34px rgba(32, 43, 61, 0.14);
    text-align: left;
}

#login_logo {
    width: 220px;
    height: 82px;
    margin: 0 auto 24px;
    padding: 10px;
    background: #ffffff url("../webERP.gif") no-repeat center center;
    background-size: contain;
    border: 1px solid #d7dce5;
    border-radius: 12px;
}

.login-header {
    margin-bottom: 24px;
    text-align: center;
}

.login-title {
    margin: 0 0 7px;
    color: #27364d;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
}

.login-subtitle {
    margin: 0;
    color: #6d7788;
    font-size: 14px;
    line-height: 1.5;
}

.login-field {
    margin-bottom: 16px;
}

.login-field label {
    display: block;
    margin-bottom: 6px;
    color: #3f4c60;
    font-size: 13px;
    font-weight: 600;
}

.login-field input[type="text"],
.login-field input[type="password"],
.login-field select {
    display: block;
    width: 100%;
    height: 43px;
    margin: 0;
    padding: 0 12px;
    background: #ffffff;
    color: #253044;
    border: 1px solid #cbd3df;
    border-radius: 8px;
    font: 14px "Segoe UI", Arial, Helvetica, sans-serif;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.login-field input[readonly] {
    background: #f5f7fa;
    color: #5d6878;
}

.login-field input:focus,
.login-field select:focus {
    border-color: #617594;
    box-shadow: 0 0 0 3px rgba(97, 117, 148, 0.14);
}

#demo_text.login-status {
    min-height: 39px;
    margin: 4px 0 16px;
    padding: 10px 12px;
    background: #f5f7fa;
    color: #596577;
    border: 1px solid #dde2e9;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.35;
    text-align: center;
}

#demo_text.login-status-success {
    background: #edf8f0;
    color: #2d6b3f;
    border-color: #c7e4cf;
}

input.button {
    display: block;
    width: 100%;
    height: 45px;
    margin: 0;
    padding: 0 18px;
    background: #354a67;
    color: #ffffff;
    border: 1px solid #354a67;
    border-radius: 8px;
    box-shadow: 0 6px 14px rgba(53, 74, 103, 0.20);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

input.button:hover {
    background: #293d59;
    border-color: #293d59;
    transform: translateY(-1px);
}

input.button:active {
    transform: translateY(0);
}

.login-recovery {
    margin-top: 15px;
    text-align: center;
}

.login-recovery-link {
    color: #465f82;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.login-recovery-link:hover,
.login-recovery-link:focus {
    color: #263f61;
    text-decoration: underline;
}

.login-footer {
    margin-top: 19px;
    color: #87909e;
    font-size: 12px;
    text-align: center;
}

.login-message {
    margin-bottom: 18px;
    padding: 11px 12px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.45;
}

.login-message-warning {
    background: #fff8e7;
    color: #755b20;
    border: 1px solid #ead8a3;
}

@media (max-width: 480px) {
    body {
        padding: 18px 12px;
    }

    #container.login-card {
        padding: 24px 20px 20px;
        border-radius: 12px;
    }

    #login_logo {
        width: 190px;
        height: 72px;
        margin-bottom: 20px;
    }

    .login-title {
        font-size: 24px;
    }
}


/* ==========================================================
   CAMPOS DE CONTRASEÑA CON BOTÓN MOSTRAR/OCULTAR
   ========================================================== */

.password-input-wrap {
    position: relative;
    width: 100%;
}

.password-input-wrap input[type="password"],
.password-input-wrap input[type="text"] {
    padding-right: 50px !important;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 6px;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px !important;
    height: 34px !important;
    min-width: 38px;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    color: #596577 !important;
    border: 0 !important;
    border-radius: 7px !important;
    box-shadow: none !important;
    font-size: 17px;
    line-height: 1;
    cursor: pointer;
}

.password-toggle:hover,
.password-toggle:focus {
    background: #eef1f5 !important;
    color: #263f61 !important;
    outline: none;
    transform: translateY(-50%) !important;
}

/* ==========================================================
   RECUPERACIÓN Y RESTABLECIMIENTO DE CONTRASEÑA
   ========================================================== */

body.password-reset-page {
    margin: 0;
    padding: 42px 16px;
    min-height: 100vh;
    background: #eef1f5;
    color: #253044;
    font: 14px "Segoe UI", Arial, Helvetica, sans-serif;
    text-align: center;
}

body.password-reset-page #container.password-reset-container {
    width: 100%;
    max-width: 430px;
    margin: 0 auto;
    padding: 30px 34px 24px;
    background: #ffffff;
    border: 1px solid #d6dce5;
    border-radius: 14px;
    box-shadow: 0 14px 34px rgba(32, 43, 61, 0.14);
    text-align: left;
}

body.password-reset-page .password-reset-title {
    margin: 0 0 8px;
    color: #27364d;
    font-size: 27px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
}

body.password-reset-page .password-reset-subtitle {
    margin: 0 0 24px;
    color: #6d7788;
    font-size: 14px;
    line-height: 1.5;
    text-align: center;
}

body.password-reset-page .field {
    margin-bottom: 16px;
}

body.password-reset-page .field label {
    display: block;
    margin-bottom: 6px;
    color: #3f4c60;
    font-size: 13px;
    font-weight: 600;
}

body.password-reset-page .field input[type="text"],
body.password-reset-page .field input[type="password"],
body.password-reset-page .field select {
    display: block;
    width: 100%;
    height: 43px;
    margin: 0;
    padding: 0 12px;
    background: #ffffff;
    color: #253044;
    border: 1px solid #cbd3df;
    border-radius: 8px;
    font: 14px "Segoe UI", Arial, Helvetica, sans-serif;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

body.password-reset-page .field input[readonly] {
    background: #f5f7fa;
    color: #5d6878;
}

body.password-reset-page .field input:focus,
body.password-reset-page .field select:focus {
    border-color: #617594;
    box-shadow: 0 0 0 3px rgba(97, 117, 148, 0.14);
}

body.password-reset-page button.button {
    display: block;
    width: 100%;
    height: 45px;
    margin: 0;
    padding: 0 18px;
    background: #354a67;
    color: #ffffff;
    border: 1px solid #354a67;
    border-radius: 8px;
    box-shadow: 0 6px 14px rgba(53, 74, 103, 0.20);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

body.password-reset-page button.button:hover {
    background: #293d59;
    border-color: #293d59;
}

body.password-reset-page .message {
    margin-bottom: 18px;
    padding: 11px 12px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.45;
}

body.password-reset-page .message.success {
    background: #edf8f0;
    color: #2d6b3f;
    border: 1px solid #c7e4cf;
}

body.password-reset-page .message.error {
    background: #fff0f0;
    color: #8c2f2f;
    border: 1px solid #edc2c2;
}

body.password-reset-page .help {
    margin-top: 16px;
    padding: 10px 12px;
    background: #f5f7fa;
    color: #596577;
    border: 1px solid #dde2e9;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.45;
    text-align: center;
}

body.password-reset-page .links {
    margin-top: 16px;
    text-align: center;
}

body.password-reset-page .links a {
    color: #465f82;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

body.password-reset-page .links a:hover,
body.password-reset-page .links a:focus {
    color: #263f61;
    text-decoration: underline;
}

body.password-reset-page .password-reset-footer {
    margin-top: 19px;
    color: #87909e;
    font-size: 12px;
    text-align: center;
}

@media (max-width: 480px) {
    body.password-reset-page {
        padding: 18px 12px;
    }

    body.password-reset-page #container.password-reset-container {
        padding: 24px 20px 20px;
        border-radius: 12px;
    }

    body.password-reset-page .password-reset-title {
        font-size: 24px;
    }
}