/* Reset y estilos base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);
    min-height: 100vh;
    position: relative;
}

    /* Animaci�n de fondo */
    body::before {
        content: '';
        position: absolute;
        width: 100%;
        height: 100%;
        background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="rgba(255,255,255,0.1)" fill-opacity="1" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,154.7C960,171,1056,181,1152,165.3C1248,149,1344,107,1392,85.3L1440,64L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
        background-size: cover;
        opacity: 0.3;
        pointer-events: none;
    }

.container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* Card de login */
.login-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    padding: 40px;
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header */
.login-header {
    text-align: center;
    margin-bottom: 30px;
}

    .login-header h3 {
        color: #2563eb;
        font-size: 28px;
        font-weight: bold;
        margin-bottom: 8px;
    }

    .login-header small {
        color: #888;
        font-size: 14px;
    }

/* Grupos de formulario */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

select, input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e1e1;
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: white;
    font-family: inherit;
}

    select:focus, input:focus {
        outline: none;
        border-color: #2563eb;
        box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    }

/* Campo de contrase�a con toggle */
.password-wrapper {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 18px;
    user-select: none;
    color: #888;
    transition: color 0.3s;
}

    .toggle-password:hover {
        color: #2563eb;
    }

/* Mensajes de error */
.validation-summary {
    background: #fee;
    border-left: 4px solid #f44336;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 13px;
    color: #d32f2f;
}

    .validation-summary ul {
        margin: 0;
        padding-left: 20px;
    }

.field-error {
    color: #f44336;
    font-size: 12px;
    margin-top: 5px;
    display: block;
}

/* Bot�n */
.btn-login {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 10px;
}

    .btn-login:hover {
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(37, 99, 235, 0.4);
    }

    .btn-login:active {
        transform: translateY(0);
    }

    /* Loading spinner */
    .btn-login.loading {
        position: relative;
        color: transparent;
    }

        .btn-login.loading::after {
            content: '';
            position: absolute;
            width: 20px;
            height: 20px;
            top: 50%;
            left: 50%;
            margin-left: -10px;
            margin-top: -10px;
            border: 2px solid white;
            border-radius: 50%;
            border-top-color: transparent;
            animation: spin 0.8s linear infinite;
        }

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Badge de cliente autenticado (en Home/Index) */
.cliente-badge {
    display: flex;
    align-items: center;
    gap: .5rem;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    padding: .55rem .85rem;
    margin-bottom: 1.25rem;
    font-size: .85rem;
    color: #1e40af;
}

.cliente-badge i { color: #2563eb; }

.cliente-badge span { flex: 1; }

.cliente-badge strong { color: #1e3a8a; }

.cliente-badge-salir {
    color: #6b7280;
    font-size: 1rem;
    line-height: 1;
    transition: color .2s;
    text-decoration: none;
}
.cliente-badge-salir:hover { color: #ef4444; }

/* Footer */
.login-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 12px;
    color: #888;
}

/* Responsive */
@media (max-width: 480px) {
    .login-card {
        padding: 30px 20px;
    }

    .login-header h3 {
        font-size: 24px;
    }
}
