*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: #eef2f7;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ── Card ── */
.login-card {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.04),
        0 8px 24px rgba(0, 0, 0, 0.08),
        0 24px 48px rgba(0, 0, 0, 0.06);
    padding: 48px 52px 44px;
    width: 100%;
    max-width: 460px;
}

/* ── Logo / header ── */
.login-logo {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    /* quitar background e box-shadow azul */
    background: transparent;
    box-shadow: none;
}

.login-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.login-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
    text-align: center;
    margin-bottom: 4px;
    letter-spacing: -.3px;
}

.login-sub {
    font-size: .875rem;
    color: #64748b;
    text-align: center;
    margin-bottom: 32px;
}

/* ── Floating label ── */
.custom-floating {
    position: relative;
    margin-bottom: 20px;
}

.custom-floating input {
    width: 100%;
    padding: 15px 14px 15px 14px;
    padding-right: 42px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: .9375rem;
    color: #0f172a;
    background: #f8fafc;
    outline: none;
    transition: border-color .2s, box-shadow .2s, background .2s;
}

.custom-floating input:focus {
    border-color: #3b82f6;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.custom-floating input.is-invalid {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.10);
}

.custom-floating::before {
    content: attr(data-label);
    position: absolute;
    left: 14px;
    top: 15px;
    background: transparent;
    padding: 0 4px;
    color: #94a3b8;
    font-size: .9375rem;
    pointer-events: none;
    transition: all .2s;
}

.custom-floating:has(input:focus)::before,
.custom-floating:has(input:not(:placeholder-shown))::before {
    top: -9px;
    font-size: .75rem;
    color: #3b82f6;
    background: #fff;
    font-weight: 500;
}

.custom-floating:has(input.is-invalid:not(:focus))::before {
    color: #ef4444;
}

.custom-floating .toggle-pass {
    position: absolute;
    right: 13px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #94a3b8;
    transition: color .2s;
    line-height: 1;
}

.custom-floating .toggle-pass:hover {
    color: #475569;
}

/* ── Botón ── */
#btnLogin {
    width: 100%;
    padding: 13px;
    font-size: .9375rem;
    font-weight: 600;
    border-radius: 10px;
    border: none;
    background: #1d4ed8;
    color: #fff;
    cursor: pointer;
    transition: background .2s, box-shadow .2s, transform .1s;
    box-shadow: 0 2px 8px rgba(29, 78, 216, 0.30);
    margin-top: 4px;
}

#btnLogin:hover:not(:disabled) {
    background: #1e40af;
    box-shadow: 0 4px 16px rgba(29, 78, 216, 0.38);
}

#btnLogin:active:not(:disabled) {
    transform: scale(.99);
}

#btnLogin:disabled {
    opacity: .7;
    cursor: not-allowed;
}

/* ── Alert ── */
#alertBox .alert {
    font-size: .875rem;
    border-radius: 10px;
    padding: 11px 14px;
    margin-bottom: 18px;
    border: none;
    background: #fef2f2;
    color: #b91c1c;
    box-shadow: 0 1px 4px rgba(239, 68, 68, .10);
}

/* ── Footer link ── */
.forgot-link {
    display: block;
    text-align: center;
    margin-top: 18px;
    font-size: .8125rem;
    color: #64748b;
    text-decoration: none;
    transition: color .2s;
}

.forgot-link:hover {
    color: #1d4ed8;
}

/* ── Responsive ── */
@media (max-width: 520px) {
    .login-card {
        padding: 36px 24px 32px;
        border-radius: 14px;
    }
}