* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    min-height: 100%;
}

body {
    font-family: 'Montserrat', sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;

    padding: 24px;
    background: url("../imagenes/5.png") center center / cover no-repeat;
    position: relative;

    overflow-x: hidden;
    overflow-y: auto;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.25);
    z-index: 0;
}

.shape {
    position: fixed;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    z-index: 0;
}

.login-card {
    width: min(920px, 100%);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    border-radius: 30px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    position: relative;
    z-index: 2;
}

.branding-side {
    background: #ffffff;
    padding: 48px 42px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 18px;
    text-align: center;
}

.logo-container {
    width: 100%;
    max-width: 250px;
}

.logo-container img {
    width: 100%;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.1));
}

.tagline {
    font-size: 1rem;
    color: #555;
    font-weight: 400;
    line-height: 1.6;
}

.tagline span {
    color: #b00c1e;
    font-weight: 700;
}

.brand-icons {
    margin-top: 28px;
    color: #ddd;
    font-size: 2rem;
}

.brand-icons i {
    margin: 0 10px;
}

form {
    background: #1a1a1a;
    padding: 54px 46px;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

form h2 {
    font-size: clamp(1.7rem, 4vw, 2.2rem);
    margin-bottom: 8px;
    background: linear-gradient(to right, #ff8c00, #b00c1e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

form > p {
    color: #aaa !important;
    margin-bottom: 28px !important;
    font-size: 0.95rem;
}

.input-group {
    margin-bottom: 18px;
    position: relative;
}

.input-group i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #ff8c00;
}

.input-field {
    width: 100%;
    padding: 15px 15px 15px 45px;
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 14px;
    color: white;
    outline: none;
    transition: 0.3s;
    font-size: 15px;
}

.input-field:focus {
    border-color: #ff8c00;
    box-shadow: 0 0 10px rgba(255, 140, 0, 0.25);
}

.login-btn {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(90deg, #b00c1e, #ff8c00);
    color: white;
    font-weight: 800;
    font-size: 0.95rem;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 15px;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(176, 12, 30, 0.3);
}

.footer-links {
    margin-top: 4px;
    display: flex;
    justify-content: space-between;
    gap: 14px;
    font-size: 0.85rem;
}

.footer-links a {
    color: #aaa;
    text-decoration: none;
    transition: 0.3s;
}

.footer-links a:hover {
    color: #ff8c00;
}

.alert-error,
.alert-success {
    padding: 12px 14px;
    margin-bottom: 18px;
    border-radius: 12px;
    font-size: 0.88rem;
    line-height: 1.4;
}

.alert-error {
    background: rgba(255, 87, 87, 0.16);
    border-left: 4px solid #ff5757;
}

.alert-error i,
.alert-error span {
    color: #ff5757;
}

.alert-success {
    background: rgba(76, 175, 80, 0.16);
    border-left: 4px solid #4caf50;
}

.alert-success i,
.alert-success span {
    color: #4caf50;
}

.alert-error i,
.alert-success i {
    margin-right: 8px;
}

.copyright {
    text-align: center;
    margin-top: 28px;
    font-size: 0.72rem;
    color: #666;
}

/* TABLET */
@media (max-width: 850px) {
    body {
        align-items: flex-start;
        padding: 18px;
    }

    .login-card {
        grid-template-columns: 1fr;
        max-width: 520px;
    }

    .branding-side {
        padding: 32px 28px 26px;
    }

    .logo-container {
        max-width: 210px;
    }

    .brand-icons {
        margin-top: 12px;
        font-size: 1.5rem;
    }

    form {
        padding: 34px 28px;
    }
}

/* MOBILE */
@media (max-width: 480px) {
    body {
        padding: 0;
        background-position: center;
    }

    body::before {
        background: rgba(15, 23, 42, 0.35);
    }

    .shape {
        display: none;
    }

    .login-card {
        min-height: 100vh;
        border-radius: 0;
        box-shadow: none;
    }

    .branding-side {
        padding: 28px 22px 20px;
    }

    .logo-container {
        max-width: 175px;
    }

    .tagline {
        font-size: 0.86rem;
        line-height: 1.45;
    }

    .brand-icons {
        display: none;
    }

    form {
        padding: 30px 22px 24px;
        justify-content: flex-start;
    }

    form h2 {
        text-align: center;
        font-size: 1.7rem;
    }

    form > p {
        text-align: center;
        font-size: 0.85rem;
        margin-bottom: 22px !important;
    }

    .input-field {
        padding: 14px 14px 14px 43px;
        font-size: 14px;
    }

    .login-btn {
        padding: 14px;
        font-size: 0.85rem;
    }

    .footer-links {
        flex-direction: column;
        text-align: center;
        gap: 10px;
        margin-top: 20px;
    }
}

/* MOBILE BAJO */
@media (max-height: 720px) and (max-width: 480px) {
    .branding-side {
        padding: 18px 20px 14px;
    }

    .logo-container {
        max-width: 145px;
    }

    .tagline {
        display: none;
    }

    form {
        padding-top: 22px;
    }
}