/* Login — misma línea visual que el panel (#003799 / #000000) */

:root {
    --brand: #003799;
    --brand-hover: #004aad;
    --brand-active: #0058c4;
    --brand-deep: #002666;
    --black: #000000;
    --white: #ffffff;
    --surface: #f0f4f9;
    --font: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Roboto", sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--font);
    background: linear-gradient(145deg, var(--brand-deep) 0%, var(--black) 55%, #0a1628 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px;
    -webkit-font-smoothing: antialiased;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(0, 55, 153, 0.45), transparent),
        radial-gradient(circle at 100% 100%, rgba(0, 74, 173, 0.2), transparent 40%);
    pointer-events: none;
}

.login-box {
    position: relative;
    background: var(--white);
    padding: 36px 32px 32px;
    border-radius: 16px;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.08);
    animation: loginIn 0.35s ease;
}

.login-box h2 {
    text-align: center;
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 600;
    color: var(--black);
    letter-spacing: -0.02em;
}

.login-box h2::after {
    content: "";
    display: block;
    width: 48px;
    height: 3px;
    margin: 14px auto 0;
    background: linear-gradient(90deg, var(--brand), var(--brand-hover));
    border-radius: 2px;
}

.login-box form {
    margin-top: 24px;
}

.login-box input {
    width: 100%;
    padding: 14px 16px;
    margin-bottom: 12px;
    border-radius: 10px;
    border: 1px solid rgba(0, 55, 153, 0.2);
    font-family: inherit;
    font-size: 15px;
    color: var(--black);
    background: var(--surface);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.login-box input::placeholder {
    color: #54656f;
}

.login-box input:hover {
    border-color: rgba(0, 55, 153, 0.35);
}

.login-box input:focus {
    outline: none;
    border-color: var(--brand);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(0, 55, 153, 0.12);
}

.login-box button {
    width: 100%;
    padding: 14px 16px;
    margin-top: 8px;
    background: linear-gradient(180deg, var(--brand-hover) 0%, var(--brand) 100%);
    color: var(--white);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: filter 0.2s ease, transform 0.12s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 14px rgba(0, 55, 153, 0.35);
}

.login-box button:hover {
    filter: brightness(1.06);
    box-shadow: 0 6px 20px rgba(0, 55, 153, 0.4);
}

.login-box button:active {
    transform: scale(0.99);
    filter: brightness(0.95);
}

.error {
    color: #b00020;
    margin: 12px 0 0;
    padding: 10px 12px;
    text-align: center;
    font-size: 13px;
    font-weight: 500;
    background: #fde8e8;
    border-radius: 8px;
    border: 1px solid rgba(176, 0, 32, 0.2);
}

@keyframes loginIn {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
