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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
}

body:not(.login-page) {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* ========== Login pantalla partida ========== */
body.login-page {
    background: #f4f6f9;
    margin: 0;
    padding: 0;
    display: block;
}

.login-split {
    display: grid;
    grid-template-columns: minmax(320px, 1fr) minmax(0, 1.15fr);
    min-height: 100vh;
    min-height: 100dvh;
}

.login-split__form-side {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 32px 24px;
    background: #f4f6f9;
}

.login-form-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    padding: 36px 40px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
}

.login-split__visual {
    position: relative;
    min-height: 280px;
    background: #1e1b4b;
    overflow: hidden;
}

.login-split__slides {
    position: absolute;
    inset: 0;
}

.login-split__slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1.1s ease-in-out;
    pointer-events: none;
}

.login-split__slide.is-visible {
    opacity: 1;
}

.login-split__scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(30, 27, 75, 0.55) 0%,
        rgba(49, 46, 129, 0.35) 45%,
        rgba(15, 23, 42, 0.5) 100%
    );
    pointer-events: none;
}

.login-split__promo {
    position: relative;
    z-index: 2;
    height: 100%;
    min-height: 360px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 48px 56px;
    max-width: 520px;
}

.login-split__promo h2 {
    color: #fff;
    font-size: clamp(1.75rem, 3vw, 2.35rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 16px;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.25);
}

.login-split__promo p {
    color: rgba(255, 255, 255, 0.92);
    font-size: 1.05rem;
    line-height: 1.55;
    margin-bottom: 0;
    text-shadow: 0 1px 12px rgba(0, 0, 0, 0.2);
}

.login-container {
    width: 100%;
    max-width: 450px;
}

.login-form,
.login-form-card .login-form-inner {
    background: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
}

.login-form h2,
.login-form-card .login-form-inner h2 {
    color: #111827;
    margin-bottom: 24px;
    text-align: left;
    font-size: 1.5rem;
    font-weight: 700;
}

.form-intro {
    color: #555;
    font-size: 14px;
    text-align: center;
    margin-bottom: 24px;
    line-height: 1.45;
}

.form-footer {
    text-align: center;
    margin-top: 22px;
    font-size: 14px;
}

.form-footer a {
    color: #2a5298;
    font-weight: 500;
    text-decoration: none;
}

.form-footer a:hover {
    text-decoration: underline;
}

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

.form-group label {
    display: block;
    color: #333;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.2s, box-shadow 0.2s;
    background-color: #fff;
}

.form-group input:focus {
    outline: none;
    border-color: #2a5298;
    box-shadow: 0 0 0 3px rgba(42, 82, 152, 0.1);
}

body.login-page .form-group input:focus {
    border-color: var(--login-brand, #2563eb);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

body.login-page .form-group input:invalid:not(:placeholder-shown) {
    border-color: #dc2626;
}

.form-group input:invalid {
    border-color: #f44336;
}

.btn-login {
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
    margin-top: 10px;
}

body.login-page .btn-login {
    border-radius: 8px;
}

.btn-login:hover {
    background: linear-gradient(135deg, #45a049 0%, #3d8b40 100%);
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(76, 175, 80, 0.35);
}

.btn-login:active {
    transform: translateY(0);
}

.mensaje {
    padding: 12px 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    font-size: 14px;
    text-align: center;
}

.mensaje.error {
    background-color: #ffebee;
    color: #c62828;
    border: 1px solid #ef5350;
}

.mensaje.warning {
    background-color: #fff3e0;
    color: #e65100;
    border: 1px solid #ff9800;
}

.mensaje.success {
    background-color: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #4caf50;
}

@media (max-width: 900px) {
    .login-split {
        grid-template-columns: 1fr;
    }

    .login-split__visual {
        display: none;
    }

    .login-split__form-side {
        min-height: 100vh;
        min-height: 100dvh;
    }
}

@media (max-width: 480px) {
    .login-form {
        padding: 30px 20px;
    }

    .login-form-card {
        padding: 28px 22px;
    }

    .login-form h2,
    .login-form-card .login-form-inner h2 {
        font-size: 1.35rem;
    }
}
