/**
 * Login — misma línea visual que BGM (fondo teal oscuro + tarjeta partida).
 */
*,
*::before,
*::after {
    box-sizing: border-box;
}

.bgm-login-page {
    margin: 0;
    min-height: 100vh;
    font-family: "Inter", system-ui, sans-serif;
    color: #1f2937;
    position: relative;
    overflow-x: hidden;
    background: #012428;
}

.bgm-login-bg {
    pointer-events: none;
    position: absolute;
    inset: 0;
}

.bgm-login-bg__grad {
    position: absolute;
    inset: 0;
    background: linear-gradient(165deg, #011a1d 0%, #022f35 38%, #03454d 72%, #045a63 100%);
}

.bgm-login-bg__shine {
    position: absolute;
    inset: 0;
    opacity: 0.18;
    background: linear-gradient(105deg, transparent 32%, rgba(0, 131, 143, 0.45) 50%, transparent 68%);
}

.bgm-login-bg__grid {
    position: absolute;
    inset: 0;
    opacity: 0.05;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 32px 32px;
}

.bgm-login-bg__blob {
    position: absolute;
    left: -25%;
    top: 50%;
    width: min(80vw, 640px);
    height: min(70vh, 560px);
    transform: translateY(-50%);
    border-radius: 50%;
    background: radial-gradient(ellipse at center, rgba(0, 131, 143, 0.22), transparent 62%);
    filter: blur(48px);
}

.bgm-login-wrap {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1rem;
}

.bgm-login-card {
    width: 100%;
    max-width: min(92vw, 880px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 0.5rem;
    background: #fff;
    box-shadow: 0 24px 64px -16px rgba(0, 0, 0, 0.55);
}

@media (min-width: 1024px) {
    .bgm-login-card {
        flex-direction: row;
        min-height: min(520px, 78vh);
    }
}

.bgm-login-brand {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2.5rem 2rem;
    background: #fff;
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    text-align: center;
}

@media (min-width: 1024px) {
    .bgm-login-brand {
        width: 42%;
        border-bottom: none;
        border-right: 1px solid rgba(226, 232, 240, 0.9);
        text-align: left;
        padding: 3.5rem 2.5rem;
    }
}

.bgm-login-brand img {
    max-width: 280px;
    height: auto;
    margin: 0 auto;
}

@media (min-width: 1024px) {
    .bgm-login-brand img {
        margin: 0;
    }
}

.bgm-login-form-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2.25rem 2rem;
    background: rgba(248, 250, 252, 0.95);
}

@media (min-width: 640px) {
    .bgm-login-form-col {
        padding: 2.75rem 2.5rem;
    }
}

.bgm-login-form-col header {
    margin-bottom: 2rem;
}

.bgm-login-form-col h1 {
    margin: 0;
    font-family: "Outfit", "Inter", sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #0f172a;
    text-transform: uppercase;
}

@media (min-width: 640px) {
    .bgm-login-form-col h1 {
        font-size: 1.75rem;
    }
}

.bgm-login-form-col .bgm-login-sub {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.9375rem;
    line-height: 1.55;
    color: #475569;
    text-transform: none;
    font-weight: 400;
}

.bgm-login-field {
    margin-bottom: 1.25rem;
}

.bgm-login-field label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #64748b;
}

.bgm-login-field .input-wrap {
    position: relative;
}

.bgm-login-field input[type="email"],
.bgm-login-field input[type="password"],
.bgm-login-field input[type="text"] {
    width: 100%;
    padding: 0.65rem 1rem 0.65rem 2.75rem;
    font-size: 0.9375rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    background: #fff;
    color: #0f172a;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.bgm-login-field input:focus {
    outline: none;
    border-color: #2d5a3f;
    box-shadow: 0 0 0 3px rgba(45, 90, 63, 0.12);
}

.bgm-login-field input.is-invalid {
    border-color: #dc2626;
}

.bgm-login-field input.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
}

.bgm-login-field .input-icon {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 1rem;
    pointer-events: none;
}

.bgm-login-field .input-wrap--pass input {
    padding-right: 2.75rem;
}

.bgm-login-toggle {
    position: absolute;
    right: 0.35rem;
    top: 50%;
    transform: translateY(-50%);
    width: 2.25rem;
    height: 2.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 0.375rem;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
}

.bgm-login-toggle:hover {
    background: #f1f5f9;
    color: #334155;
}

.bgm-login-submit {
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.85rem 1rem;
    font-size: 0.9375rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #fff;
    background: #00838f;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    box-shadow: 0 8px 24px -6px rgba(0, 131, 143, 0.42);
    transition: background 0.15s, box-shadow 0.15s, transform 0.05s;
}

.bgm-login-submit:hover {
    background: #006d76;
    box-shadow: 0 10px 28px -8px rgba(0, 131, 143, 0.48);
}

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

.invalid-feedback {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.8125rem;
    color: #b91c1c;
}

.bgm-login-foot {
    margin-top: 2rem;
    padding-top: 1.5rem;
    text-align: center;
    font-size: 0.6875rem;
    line-height: 1.5;
    color: #94a3b8;
}

.bgm-login-foot a {
    color: #64748b;
    font-weight: 600;
    text-decoration: none;
}

.bgm-login-foot a:hover {
    color: #00838f;
}
