* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    font-family:
        Arial,
        Helvetica,
        sans-serif;

    background: #000;
    color: #fff;
}

button,
input {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

.login-page {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #000;
}

.login-page::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(
            to bottom,
            rgba(0, 0, 0, 0.18),
            rgba(0, 0, 0, 0.38)
        ),
        url("../images/login/fondo-login.png");

    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    pointer-events: none;
}

.login-main {
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding:
        40px
        24px
        35px;
}

.login-container {
    width: 100%;
    max-width: 650px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.login-logo {
    width: min(460px, 82vw);
    margin-bottom: 28px;
}

.login-logo img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
}

.login-card {
    width: 100%;
    padding:
        38px
        42px
        36px;

    border:
        1px
        solid
        rgba(208, 30, 30, 0.55);

    border-radius: 15px;

    background:
        linear-gradient(
            145deg,
            rgba(20, 20, 20, 0.96),
            rgba(8, 8, 8, 0.97)
        );

    box-shadow:
        0 20px 55px rgba(0, 0, 0, 0.55),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);

    backdrop-filter: blur(5px);
}

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

.login-header h1 {
    color: #fff;
    font-size: clamp(28px, 3vw, 36px);
    line-height: 1.15;
    font-weight: 700;
}

.login-title-line {
    width: 78px;
    height: 2px;
    margin: 22px auto 0;
    background:
        linear-gradient(
            90deg,
            transparent,
            #d90000,
            transparent
        );
}

.login-form {
    width: 100%;
}

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

.form-group label {
    display: block;
    margin-bottom: 10px;
    color: #f4f4f4;
    font-size: 16px;
    font-weight: 600;
}

.input-container {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 58px;

    border:
        1px
        solid
        rgba(255, 255, 255, 0.38);

    border-radius: 7px;
    background: rgba(10, 10, 10, 0.78);

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

.input-container:focus-within {
    border-color: #e00000;

    box-shadow:
        0 0 0 3px rgba(224, 0, 0, 0.14);

    background: rgba(16, 16, 16, 0.95);
}

.input-container.input-error {
    border-color: #ef4444;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    width: 24px;
    height: 24px;
    transform: translateY(-50%);
    color: #e4e4e4;
    pointer-events: none;
}

.input-icon svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.input-container input {
    width: 100%;
    height: 58px;
    padding:
        0
        54px
        0
        54px;

    border: none;
    outline: none;
    background: transparent;
    color: #fff;
    font-size: 16px;
}

.input-container input::placeholder {
    color: #8b8b8b;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 14px;

    width: 34px;
    height: 34px;

    transform: translateY(-50%);

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

    border: none;
    outline: none;
    background: transparent;
    color: #e5e5e5;

    cursor: pointer;
}

.password-toggle:hover {
    color: #fff;
}

.password-toggle svg {
    width: 23px;
    height: 23px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.eye-hidden {
    display: none;
}

.password-toggle.showing .eye-visible {
    display: none;
}

.password-toggle.showing .eye-hidden {
    display: block;
}

.form-error {
    display: block;
    margin-top: 7px;
    color: #ff5252;
    font-size: 13px;
}

.login-options {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin:
        2px
        0
        25px;
}

.forgot-password {
    color: #f02020;
    font-size: 15px;
    text-decoration: none;
    transition: color 0.2s ease;
}

.forgot-password:hover {
    color: #ff4d4d;
    text-decoration: underline;
}

.login-button {
    width: 100%;
    min-height: 61px;

    border:
        1px
        solid
        #ff2222;

    border-radius: 7px;

    background:
        linear-gradient(
            100deg,
            #f20d17 0%,
            #c40008 58%,
            #a9090d 100%
        );

    color: #fff;

    font-size: 18px;
    font-weight: 700;

    cursor: pointer;

    box-shadow:
        0 6px 20px rgba(215, 0, 0, 0.2);

    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease,
        filter 0.18s ease;
}

.login-button:hover {
    filter: brightness(1.1);

    box-shadow:
        0 9px 25px rgba(215, 0, 0, 0.3);
}

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

.login-footer {
    position: relative;
    z-index: 1;

    min-height: 90px;

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

    padding:
        20px
        25px;

    border-top:
        1px
        solid
        rgba(196, 0, 0, 0.8);

    background: rgba(0, 0, 0, 0.94);
}

.login-footer p {
    color: #d8d8d8;
    font-size: 14px;
    text-align: center;
}

/* Laptop */

@media (max-width: 1366px) {

    .login-main {
        padding:
            28px
            20px;
    }

    .login-container {
        max-width: 570px;
    }

    .login-logo {
        width: min(390px, 72vw);
        margin-bottom: 20px;
    }

    .login-card {
        padding:
            30px
            36px;
    }

    .login-header {
        margin-bottom: 25px;
    }

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

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

    .input-container,
    .input-container input {
        height: 53px;
        min-height: 53px;
    }

    .login-button {
        min-height: 55px;
    }

    .login-footer {
        min-height: 70px;
    }
}

/* Tablet */

@media (max-width: 900px) {

    .login-page::before {
        background-position: center center;
    }

    .login-main {
        padding:
            32px
            20px;
    }

    .login-container {
        max-width: 540px;
    }

    .login-logo {
        width: min(370px, 72vw);
    }

    .login-card {
        padding:
            32px
            30px;
    }
}

/* Teléfono */

@media (max-width: 600px) {

    .login-page {
        min-height: 100dvh;
    }

    .login-page::before {
        background-size: cover;
        background-position: center center;
        opacity: 0.65;
    }

    .login-main {
        align-items: center;

        padding:
            30px
            16px
            25px;
    }

    .login-logo {
        width: min(310px, 82vw);
        margin-bottom: 24px;
    }

    .login-card {
        padding:
            28px
            20px
            25px;

        border-radius: 12px;
    }

    .login-header {
        margin-bottom: 27px;
    }

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

    .login-title-line {
        margin-top: 16px;
    }

    .form-group label {
        font-size: 15px;
    }

    .input-container,
    .input-container input {
        min-height: 54px;
        height: 54px;
    }

    .input-container input {
        padding:
            0
            49px
            0
            49px;

        font-size: 15px;
    }

    .input-icon {
        left: 14px;
        width: 22px;
        height: 22px;
    }

    .password-toggle {
        right: 9px;
    }

    .login-options {
        margin-bottom: 22px;
    }

    .forgot-password {
        font-size: 14px;
    }

    .login-button {
        min-height: 55px;
        font-size: 17px;
    }

    .login-footer {
        min-height: 68px;
        padding: 17px 15px;
    }

    .login-footer p {
        font-size: 12px;
    }
}

/* Teléfonos pequeños */

@media (max-width: 380px) {

    .login-main {
        padding-left: 12px;
        padding-right: 12px;
    }

    .login-card {
        padding:
            25px
            16px;
    }

    .login-logo {
        width: 260px;
    }
}

/* Pantallas bajas */

@media (max-height: 700px) and (min-width: 601px) {

    .login-main {
        padding:
            18px
            20px;
    }

    .login-logo {
        width: 300px;
        margin-bottom: 15px;
    }

    .login-card {
        max-width: 520px;

        padding:
            22px
            30px;
    }

    .login-header {
        margin-bottom: 20px;
    }

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

    .login-title-line {
        margin-top: 12px;
    }

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

    .input-container,
    .input-container input {
        height: 49px;
        min-height: 49px;
    }

    .login-options {
        margin-bottom: 15px;
    }

    .login-button {
        min-height: 50px;
    }

    .login-footer {
        min-height: 58px;
    }
}

.forgot-password {
    padding: 0;
    border: none;
    outline: none;
    background: transparent;
    color: #f02020;
    font-size: 15px;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s ease;
}

.forgot-password:hover {
    color: #ff4d4d;
    text-decoration: underline;
}

.forgot-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.forgot-modal.is-open {
    display: flex;
}

.forgot-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.78);
    backdrop-filter: blur(4px);
}

.forgot-modal-dialog {
    position: relative;
    z-index: 1;
    width: min(500px, 100%);
    padding: 32px;
    border: 1px solid rgba(208, 30, 30, 0.55);
    border-radius: 14px;
    background:
        linear-gradient(
            145deg,
            rgba(20, 20, 20, 0.99),
            rgba(8, 8, 8, 0.99)
        );
    box-shadow:
        0 20px 55px rgba(0, 0, 0, 0.65);
}

.forgot-modal-dialog h2 {
    margin-bottom: 12px;
    color: #ffffff;
    font-size: 26px;
}

.forgot-modal-dialog > p {
    margin-bottom: 24px;
    color: #cfcfcf;
    line-height: 1.5;
}

.forgot-modal-close {
    position: absolute;
    top: 12px;
    right: 15px;
    width: 35px;
    height: 35px;
    border: none;
    background: transparent;
    color: #ffffff;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
}

.forgot-password-success {
    margin-bottom: 18px;
    padding: 12px;
    border: 1px solid rgba(34, 197, 94, 0.45);
    border-radius: 6px;
    background: rgba(34, 197, 94, 0.12);
    color: #9ef0b5;
    font-size: 14px;
    line-height: 1.5;
}

.login-status {
    margin-bottom: 22px;
    padding: 12px;
    border: 1px solid rgba(34, 197, 94, 0.45);
    border-radius: 6px;
    background: rgba(34, 197, 94, 0.12);
    color: #9ef0b5;
    font-size: 14px;
    line-height: 1.5;
}

.forgot-modal-open {
    overflow: hidden;
}

@media (max-width: 600px) {

    .forgot-modal-dialog {
        padding:
            28px
            20px;
    }

    .forgot-modal-dialog h2 {
        font-size: 23px;
    }

    .forgot-password {
        font-size: 14px;
    }

}

.forgot-password {
    display: inline-block;
    padding: 0;
    margin: 0;
    border: none;
    outline: none;
    background: transparent;
    appearance: none;
    -webkit-appearance: none;

    color: #f02020;
    font-size: 15px;
    font-family: inherit;
    line-height: 1.4;
    text-decoration: none;

    cursor: pointer;

    transition:
        color 0.2s ease,
        opacity 0.2s ease;
}

.forgot-password:hover {
    background: transparent;
    color: #ff4d4d;
    text-decoration: underline;
}

.forgot-password:focus {
    outline: none;
}

.forgot-password:active {
    background: transparent;
}

.forgot-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;

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

    padding: 20px;
}

.forgot-modal.is-open {
    display: flex;
}

.forgot-modal-backdrop {
    position: absolute;
    inset: 0;

    background: rgba(0, 0, 0, 0.78);

    backdrop-filter: blur(4px);
}

.forgot-modal-dialog {
    position: relative;
    z-index: 1;

    width: min(500px, 100%);

    padding:
        34px
        32px
        32px;

    border:
        1px
        solid
        rgba(208, 30, 30, 0.55);

    border-radius: 14px;

    background:
        linear-gradient(
            145deg,
            rgba(20, 20, 20, 0.99),
            rgba(8, 8, 8, 0.99)
        );

    box-shadow:
        0
        20px
        55px
        rgba(0, 0, 0, 0.7);
}

.forgot-modal-dialog h2 {
    margin:
        0
        0
        12px;

    color: #ffffff;

    font-size: 26px;
    font-weight: 700;
}

.forgot-modal-dialog > p {
    margin:
        0
        0
        25px;

    color: #cfcfcf;

    font-size: 15px;
    line-height: 1.5;
}

.forgot-modal-close {
    position: absolute;

    top: 12px;
    right: 14px;

    width: 36px;
    height: 36px;

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

    padding: 0;

    border: none;

    background: transparent;

    color: #aaaaaa;

    font-size: 28px;
    line-height: 1;

    cursor: pointer;

    transition:
        color 0.2s ease,
        transform 0.2s ease;
}

.forgot-modal-close:hover {
    color: #ffffff;
    transform: scale(1.08);
}

.forgot-password-success {
    margin-bottom: 18px;

    padding: 12px 14px;

    border:
        1px
        solid
        rgba(34, 197, 94, 0.45);

    border-radius: 7px;

    background:
        rgba(34, 197, 94, 0.12);

    color: #9ef0b5;

    font-size: 14px;
    line-height: 1.5;
}

.login-status {
    margin-bottom: 22px;

    padding: 12px 14px;

    border:
        1px
        solid
        rgba(34, 197, 94, 0.45);

    border-radius: 7px;

    background:
        rgba(34, 197, 94, 0.12);

    color: #9ef0b5;

    font-size: 14px;
    line-height: 1.5;
}

.forgot-modal-open {
    overflow: hidden;
}

@media (max-width: 600px) {

    .forgot-modal-dialog {
        padding:
            30px
            20px
            24px;
    }

    .forgot-modal-dialog h2 {
        font-size: 23px;
    }

}

.login-error-status {
    margin-bottom: 22px;

    padding: 12px 14px;

    border:
        1px
        solid
        rgba(239, 68, 68, 0.5);

    border-radius: 7px;

    background:
        rgba(239, 68, 68, 0.12);

    color: #ff8a8a;

    font-size: 14px;
    line-height: 1.5;
}
